questdb / py-questdb-client

Python client for QuestDB InfluxDB Line Protocol
https://py-questdb-client.readthedocs.io
Apache License 2.0
55 stars 10 forks source link

Could not connect to "localhost:9009" #21

Closed Sharaddition closed 2 years ago

Sharaddition commented 2 years ago

After writing approx 16,000 rows in multiple tables I can no longer write data. Error -

Could not connect to "localhost:9009": Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)

A few days back I didn't have any such issue, I wrote millions of rows in a similar fashion. My program is writing data in QuestDB from 2 WebSockets running in parallel processes.

amunra commented 2 years ago

Hi @Sharaddition, would you be able to give me more insight into your setup? The client does not use websockets, so I would need some more clarity here. Do you have reconnecting logic?

A few things to take notice:

Get back to me (also on Slack) if you require further assistance.

amunra commented 2 years ago

@Sharaddition It could also be that you've exhausted the total usable set of outbound ports on the client's machine. For that I'd need to set SO_REUSEADDR on the outbound socket (i.e. https://github.com/questdb/c-questdb-client/blob/main/questdb-rs/src/ingress/mod.rs#L1596). It's pretty unusual to use up all outbound ports though, and it might be hiding another issue (see links above).

amunra commented 2 years ago

@Sharaddition Closing the issue due to inactivity. Feel free to re-open if you're still having issues or contact us on slack.