https://questdb.io logo
Title
u

李华

04/05/2023, 7:07 AM
I'm using InfluxDB Line Protocolto insert some data into the questdb database, but there are some error. Exception in thread "main" io.questdb.cutlass.line.LineSenderException:[10048] could not connect to host [host=localhost]
a

Andrey Pechkurov

04/05/2023, 7:29 AM
Hi, Do you have database available on localhost? It's worth checking the port that you're using.
u

李华

04/05/2023, 8:38 AM
I've already created the database.This error occurs after the program has been running for some time.
a

Andrey Pechkurov

04/05/2023, 9:21 AM
Have you checked server logs?
By default ILP connections get closed when the server received an invalid row
u

李华

04/05/2023, 3:21 PM
It appears that the connection was closed after this round of insertion. I've randomly generated some data, so there shouldn't be any invalid rows.
a

Andrey Pechkurov

04/05/2023, 3:49 PM
There should be some log record with "disconnect" text. You should be looking for them and everything that is above
u

李华

04/05/2023, 4:40 PM
There seems to be nothing wrong with it. Is it possible that too many connections are being created and there are not enough links in the connection pool?
a

Andrey Pechkurov

04/05/2023, 4:42 PM
Yes, ILP connection limit is 256. You can increase it via
<http://line.tcp.net|line.tcp.net>.connection.limit
config property, but it's much better to limit the total number of connections to something smaller than 10 or so
If you're hitting the limit, there should be some "max connection limit reached, unregistered listener" messages in the log
n

Nicolas Hourcard

04/11/2023, 5:07 PM
@李华 did this help? dont hesitate to ask us more questions
u

李华

04/14/2023, 2:18 AM
Thank you very much, we changed the scheme, I reduced the number of connections, so that this kind of error will not occur.
n

Nicolas Hourcard

04/14/2023, 8:49 AM
great to know!
@李华 would you be able to share a little bit about your use case?