Forums

OSError: write error at each startup

HI,

I am using an Django app, where a few python-packages are included.

Everytime when the workers need to start because the app is sleeping (usually at the first start after midnight). During that startup there is an error which causes:

SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request

uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306] during GET

OSError: write error

Probably because of the high loading time:

"GET / HTTP/1.1" 499 0 "-" ..... response-time=4.412

At the initial start page is nearly no caluation/rendering needed, so I think this can be only caused by all the packages I am using, which may need time to load (scipy, numpy, ... ). Correct?

The user sees only a page, that this site is not safe, since the SSL certificate is probably not loaded at this time? if I hit the page a second time, then it is running fine.

I appreciate any hints how I can avoid the 499 error and getting a clean startup.

Many thanks

Tom

I think there are few things that coincide -- the 499 in the access log and Broken pipe messages in the server log indicate that the server was not able to send the response because the client disconnected (probably someone closed the browser tab or reloaded it). The other thing is the SSL issue -- do you have HTTPS certs enabled and "force HTTPS" option checked out?

yes I have HTTPS certs working and also force HTTPS, which works usually just fine. Only during these failed startups I get that message that the website is not safe. 499 in not caused by closing the tab, this is me testing my app, and getting then the message that the website is not safe. So maybe the browser did the 499 because of the missing https?

Wierd is that this is not caused at every startup

I am also seeing OSError: write error in my server log at this time

Hi there, we had a hardware issue around that time. Sorry about that, it should have been fixed pretty quickly!