Answer the question
In order to leave comments, you need to log in
How to query SphinxSearch in Golang?
Hello!
I'm querying SphinxSearch in Go as described here Go Use Sphinx with Golang .
If this is not done in parallel, then everything works fine!
But requests to the sphinx are sent from goroutines, that is, in parallel.
Literally after 10-15 requests, an error occurs:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x564616]
...
database/sql.(*Rows).Next(0x0, 0xc4203beb00)
...
Answer the question
In order to leave comments, you need to log in
The error occurs because too many connections are being created. More precisely, even if there is only one connection, but requests are sent through it in parallel, an error still occurs. Same story with MySql. Even if you make requests not through a tcp socket, but through a unix socket.
The solution is to limit the number of parallel requests.
well, you have written in the error the pointer is not there or it is zero
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question