Closed pnajithkumar closed 2 years ago
@pnajithkumar this can be a limit of the ubuntu environment that you are using. Every operating system only allows for a certain number of open files/handles/sockets. In Linux you can run the following commands to check this setting:
ulimit -n
You can increase this settings to 65535
. If you want to test in your current session yu can just execute the command:
ulimit -n 65535
To save this as permanent change you need to edit /etc/sysctl.conf
with sudo permission (in this example I use vim but you can use any editor, e.g. nano):
sudo vim /etc/sysctl.conf
and add the following line:
fs.file-max = 65535
Then run the following command to apply the change:
sudo sysctl -p
Let me know if this solved the issue, thanks!
Thank you so much for the response @ezimuel. So this limit should be added in the elastic search server OR the client from where we request for the indexing? The exception details that we are getting from client exception message.
"include(/var/www/.../vendor/ezimuel/ringphp/src/Exception/ConnectException.php): failed to open stream: Too many open files "
Thanks you.
@pnajithkumar the client, from where you perform the requests
Thank you @mfn .
@pnajithkumar do you solved the issue? Thanks.
@ezimuel, we did the config changes you mentioned, but the server configuration is still showing the old limit when we run the "ulimit -n". So we are still trying to find why the config not changing. Any suggestions appreciated. Thank you
@pnajithkumar if you execute:
sudo ulimit -n 65535
and after you execute:
ulimit -n
you still see the old value and not 65535? Maybe this discussion can help.
@pnajithkumar I'm closing this issue. If you need more assistance I can reopen it, thanks.
Summary of problem or feature request
Hi,
We are getting an exception randomly as follows when we perform the indexing. While checking the logs on the elastic search server not finding any error info.
."..vendor/ezimuel/ringphp/src/Exception/ConnectException.php): failed to open stream: Too many open files "
Could you please advise where could be the problem?
Thanks, Ajith
Code snippet of problem
System details