gotenberg-php-client icon indicating copy to clipboard operation
gotenberg-php-client copied to clipboard

Random 404 not found crashes (how to debug?)

Open soullivaneuh opened this issue 5 years ago • 2 comments

Not sure it's directly related, but I sometimes have 404 error on HTML generation cli batch process:

PHP log:

 A total of 296 invoice(s) will be validated. Confirm? (yes/no) [no]:
 > yes
  48/296 [▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░]  16%[2020-03-06 23:13:52] console.ERROR: Error thrown while running command "{command}". Message: "{message}" {"exception":"[object] (TheCodingMachine\\Gotenberg\\ClientException(code: 404): 404 page not found\n at vendor/php/thecodingmachine/gotenberg-php-client/src/Client.php:106)","command":"nexy:invoice:validate","message":"404 page not found\n"} []
In Client.php line 106:
  404 page not found

Server log:

{"bytes_in":"22190","bytes_out":"49904","host":"pdf.domain.dev","latency":"2978634042","latency_human":"2.978634042s","level":"info","method":"POST","msg":"request handled","op":"context.Context.LogRequestResult","path":"/convert/html","referer":"","remote_ip":"178.170.104.70","status":200,"time":"2020-03-06T22:24:26Z","trace":"2246dyEJKiCmxJW7T540Qc1c6IucrXx5","uri":"/convert/html","user_agent":"GuzzleHttp/6.3.3 curl/7.65.0 PHP/7.3.11"}
{"bytes_in":"9288","bytes_out":"34048","host":"pdf.domain.dev","latency":"2744331022","latency_human":"2.744331022s","level":"info","method":"POST","msg":"request handled","op":"context.Context.LogRequestResult","path":"/convert/html","referer":"","remote_ip":"178.170.104.70","status":200,"time":"2020-03-06T22:26:05Z","trace":"jl5XmA38KllYHzR6LbBcPWv22ws15pkf","uri":"/convert/html","user_agent":"GuzzleHttp/6.3.3 curl/7.65.0 PHP/7.3.11"}

As you can see, the error details is not very helpful.

Does this library has option about how to debug a bit more what was done during the request? :thinking:

soullivaneuh avatar Mar 06 '20 22:03 soullivaneuh

Weird, could you provide more logs using LOG_LEVEL=DEBUG ?

gulien avatar Mar 09 '20 17:03 gulien

Unfortunately, this happened on production service while it is stressed by multiple call like this invoice generation batch command.

I may give a try to reproduce later, but it's hard to get it.

soullivaneuh avatar Mar 11 '20 22:03 soullivaneuh