Open DeviousStoat opened 5 months ago
You removed the debug log in the PR. It is a solution for your use case, but it is not general.
I used temporary log files in past versions (see f1a2a9d2c43316c962ddcfb0421031aad1e1d016 ), but then replaced with pipes. Maybe it was better.
I make the logging optional, so you can turn it off.
fixes #92
The problem causing the issue above is that
Xvfb
started to be a lot more chatty. Using it withchrome
it keeps outputing the following on each connection:So there is a lot of data going through stderr if we make a lot of connection to the display. And currently the library assigns stdout and stderr to a subprocess
PIPE
but doesn't read from it until it stops it. Hence all this data is buffered and when the buffer is full it hangs the execution of the whole program.I am not sure if what I propose is the best solution but it seems that the
PIPE
s aren't actually used, only to debug log everything at the end. Another solution could be to (optionally?) redirect stdout/stderr to a log file if we want to keep the debug data. Would be neat if we could redirect to a logger directly but unfortunately I don't think it is really possible in python.