holsee / chroxy

Headless Chrome as a Service

Home Page:https://hex.pm/packages/chroxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashes after some time

j-manu opened this issue · comments

I deployed 0.4.2 to production but it crashes after sometime it crashed. The relevant logs - https://gist.github.com/j-manu/fa27bd11d1f336144f50557b7855538a

Looks like Chrome is not responding within 5 seconds when asked to create a new page:
https://gist.github.com/j-manu/fa27bd11d1f336144f50557b7855538a#file-o-log-L30
It is hard to diagnose as to why Chrome has become unable to create a new page within 5 seconds.

I would file this as a bug if we can verify that Chroxy is unable to serve requests after this happens?

Yeah. No more requests are served. The error messages that you see in the log keeps repeating.

@holsee Any idea why this is happening?

@j-manu could it be a memory bloat issue? Chrome eating up memory instance running out of memory and crashing causing chroxy to timeout.

@zacksiri chroxy is supposed to restart chrome when it crashes

@j-manu @zacksiri I am not sure why this is happening... is it possible to obtain the debug level logs for then this occurs? (See: README as to how to enable the debug logging)
This may lead to us implementing a canary mode which externally verifies if Chrome instance is working by internally trying to run a test scenario against the instance and if it fails the instance is killed and a new one is instantiated.

The unfortunate truth is chrome via RDP is unstable and does stop responding when working with it via this interface from time to time - the promise of Chroxy is that it will identify this and start a new/fresh responsive chrome instance in its place.

I would like to see if Chrome is squealing in your scenario you are running and how many tabs are being concurrently accessed in each instance. It might be a case of adding more chrome instances into the pool as the threshold for what Chrome can handle is being hit (possibly).

If we can get some more detailed info on this, but I do think it is a chrome becoming unresponsive issue not so much it crashing. We can add more thinks to detect the problem and kill the session, we already have things like this in place, but without the extra info (or it happening on my end) I cannot do this. Closing for now, thanks for the report. Feel free to raise again if you have any issues.