Re: error log truncates important infos

2016-06-15 Thread B.R.
PHP-FPM allows generating its own log files. The default behavior of having errors sent back the FastCGI tube can be overridden with proper error logging on PHP-FPM side. 2048 bytes for each line of log is more than enough on the web server side. Do your homework: read the PHP docs. If you are

Re: error log truncates important infos

2016-06-15 Thread Robert Paprocki
If you're allowing user-generated output to be written directly to your logs without any sort of sanitation, you've got bigger problems to worry about :p Again, it doesn't really make sense to have your fcgi error sent here- why can't your fcgi process log elsewhere, and leaving the nginx error

Re: error log truncates important infos

2016-06-15 Thread philipp
Hmm I understand that limitation. But an attacker or a bad application can hide the important information which we need to identify the source of the problem. What about limiting the fastcgi output to 1024 bytes and appending this info with max 1024 bytes. client: 127.0.0.1, server: example.com,

Re: error log truncates important infos

2016-06-14 Thread Maxim Dounin
Hello! On Tue, Jun 14, 2016 at 10:44:32AM -0400, philipp wrote: [...] > Sometimes we see erros like this: [...] > 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? This is a known limitation. To

Re: error log truncates important infos

2016-06-14 Thread Robert Paprocki
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 wrote: > > We have error logs like

error log truncates important infos

2016-06-14 Thread philipp
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