sortofsleepyS
Convex Community12mo ago
15 replies
sortofsleepy

Issues running Convex Python client behind Docker

I'm running into an interesting issue while trying to utilize the Python sdk on a simple Flask application running on Gunicorn behind Docker.

First off, the application works perfectly fine when not behind Docker. Usage of the sdk is fine. However the moment I set the application up behind Docker, any requests using the sdk suddenly timeout and I just get a stacktrace pointing to the sdk function called.

Looking through the docs for the sdk I noticed that there are technically 2 client objects, a websocket based one and an http one, my guess is I'm not exposing whatever port the websocket is trying to communicate through as the http client appears to work fine.

My devops knowledge is a little rusty; is there a way to get which port I need to open? Port 80 and 443 are open already.

Or is there another trick to working with Docker? I don't mind using the http client but given that it's mentioned as being "Legacy", it'd be nice to move onto the newer class.

(as a side note, it might be good to remove the set_debug mention in the readme; unless it's somewhere else I missed, I got an error saying the method doesn't exist on ConvexClient )

Thank you.
Was this page helpful?