miguelgrinberg / turbo-flask

Integration of Hotwire's Turbo library with Flask.
MIT License
301 stars 35 forks source link

OSError: [Errno 9] Bad file descriptor with Gunicorn #12

Open JaccoVE opened 3 years ago

JaccoVE commented 3 years ago

Screenshot from 2021-07-31 12-11-11

miguelgrinberg commented 3 years ago

@JaccoVE why are your workers timing out immediately after starting?

smeetsomaiya commented 1 year ago

I have the same issue with Gunicorn + turbo flask.

Screen Shot 2022-12-12 at 1 04 56 AM

This is my turbo update code

        ```
         # Runs every 2 secs in a thread
        with app.test_request_context():
            turbo.push([turbo.update(render_template('page-1-data.html'), 'page_1_svg_data'),
                        turbo.update(render_template('page-2-data.html'), 'page_2_svg_data'),
                        turbo.update(render_template('page-3-data.html'), 'page_3_svg_data')])
            ```
miguelgrinberg commented 1 year ago

@smeetsomaiya I need to add some code to silence the error so that you don't see it in your log, but this error can be ignored as it just indicates that the client went away.

smeetsomaiya commented 1 year ago

Got it, thanks. Do you know what might be causing the "Worker was terminated due to signal 9"? Either that or the bad file descriptor stops my turbo stream.

miguelgrinberg commented 1 year ago

Had to be the signal. That means that your server was killed. I have no way to know why, if you didn't kill it yourself, then something on your system did.