Welcome! Log In Create A New Profile

Advanced

Re: error log truncates important infos

Robert Paprocki
June 14, 2016 10:54AM
Error logs have a hard coded length limit of 2048 bytes iirc, to prevent runaway log entries. You might be better off configuring your app to dump stack traces instead of relying on a proxy.

> On Jun 14, 2016, at 07:44, philipp <nginx-forum@forum.nginx.org> wrote:
>
> We have error logs like this:
>
> 2016/06/14 12:47:45 [error] 21036#21036: *378143 FastCGI sent in stderr:
> "PHP message: PHP Notice: Undefined index: model_name in
> /data/example.com/module/SalesFloor/view/partial/flyout/product.phtml on
> line 20
> PHP message: PHP Notice: Undefined index: model_name in
> /data/example.com/module/SalesFloor/view/partial/flyout/product.phtml on
> line 21
> PHP message: PHP Notice: Undefined index: model_name in
> /data/example.com/module/SalesFloor/view/partial/flyout/product.phtml on
> line 23
> PHP message: PHP Notice: Undefined index: reducedprice in
> /data/example.com/module/SalesFloor/view/partial/flyout/product.phtml on
> line 24
> PHP message: PHP Notice: Undefined index: currentprice in
> /data/example.com/module/SalesFloor/view/partial/flyout/product.phtml on
> line 24" while reading response header from upstream, client: 127.0.0.1,
> server: example.com, request: "GET / HTTP/1.1", upstream:
> "fastcgi://unix:/var/run/php-fpm-example.com.sock:", host: "127.0.0.1"
>
> For us the most important parts are the values in the last line like client,
> server and so on.
>
> Sometimes we see erros like this:
>
> 2016/06/14 12:47:23 [error] 31450#31450: *177931 FastCGI sent in stderr:
> "PHP message: PHP Notice: pg_execute(): Cannot set connection to blocking
> mode in
> /data/example.com/vendor/zendframework/zend-db/src/Adapter/Driver/Pgsql/Statement.php
> on line 228
> PHP message: PHP Fatal error: Uncaught exception
> 'Zend\Db\Adapter\Exception\InvalidQueryException' with message 'FATAL:
> terminating connection due to administrator command
> SSL connection has been closed unexpectedly' in
> /data/example.com/vendor/zendframework/zend-db/src/Adapter/Driver/Pgsql/Statement.php:235
> Stack trace:
> #0
> /data/example.com/vendor/zendframework/zend-db/src/TableGateway/AbstractTableGateway.php(238):
> Zend\Db\Adapter\Driver\Pgsql\Statement->execute()
> #1
> /data/example.com/vendor/zendframework/zend-db/src/TableGateway/AbstractTableGateway.php(208):
> Zend\Db\TableGateway\AbstractTableGateway->executeSelect(Object(Zend\Db\Sql\Select))
> #2 /data/example.com/corporate/XYZ/src/XYZ/Table/Table.php(758):
> Zend\Db\TableGateway\AbstractTableGateway->selectWith(Object(Zend\Db\Sql\Select))
> #3 /data/example.com/module/Product/src/Product/Table/Product.php(835):
> XYZ\Table\Table->selectWith(Object(Zend\Db\Sql\Select))
> #4
> /data/example.com/module/Product/src/Product/DataService/ProductDataService.php(232):
> Product\Table\P...
> PHP message: PHP Notice: pg_prepare(): Cannot set connection to blocking
> mode in
> /data/example.com/vendor/zendframework/zend-db/src/Adapter/Driver/Pgsql/Statement.php
> on line 179
> PHP message: PHP Notice: pg_execute(): Cannot set connection to blocking
> mode in
> /data/example.com/vendor/zendframework/zend-db/src/Adapter/Driver/Pgsql/Statement.php
> on line 228
> PHP message: PHP Fatal error: Uncaught exception
> 'Zend\Db\Adapter\Exception\InvalidQueryException' with message 'FATAL:
> terminating connection due to administrator command
> SSL connection has been closed unexpectedly' in
> /data/example.com/vendor/zendframework/zend-db/src/Adapter/Driver/Pgsql/Statement.php:235
> Stack trace:
> #0
> /data/example.com/vendor/zendframework/zend-db/src/TableGateway/AbstractTableGateway.php(238):
> Z
>
> It looks like they are truncated. We miss a lot of important information
> like client ip and so on. Is this a known limitation or bug in nginx?
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,267568,267568#msg-267568
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

error log truncates important infos

philipp June 14, 2016 10:44AM

Re: error log truncates important infos

Robert Paprocki June 14, 2016 10:54AM

Re: error log truncates important infos

Maxim Dounin June 14, 2016 11:12AM

Re: error log truncates important infos

philipp June 15, 2016 09:51AM

Re: error log truncates important infos

Robert Paprocki June 15, 2016 11:56AM

Re: error log truncates important infos

B.R. June 15, 2016 01:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready