You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Andreou, Arys (Nokia - GR/Athens)" <ar...@nokia.com> on 2018/01/22 07:59:47 UTC

Too many open files

Hi,

I keep getting a "Last error: Too many open files" followed by a list of node IPs.
The output of "lsof -n|grep java|wc -l" is about 674970 on each node.

What is a normal number of open files?

Thank you.


Re: Too many open files

Posted by Jeff Jirsa <jj...@gmail.com>.
Typically, long lived connections are better, so global.



-- 
Jeff Jirsa


> On Jan 22, 2018, at 3:28 AM, Andreou, Arys (Nokia - GR/Athens) <ar...@nokia.com> wrote:
> 
> It turns out it was a mistake in the client’s implementation.
> The session was created for each request but it was shut down, so all the connections were left open.
> I only needed to execute a cluste.shutdown() once the request was over.
>  
> I do have a follow up question though.
> Is it better to have a global session object or to create it and shut it down for every request?
>  
>  
> From: niki@photonhost.com [mailto:niki@photonhost.com] On Behalf Of Nikolay Mihaylov
> Sent: Monday, January 22, 2018 11:47 AM
> To: user@cassandra.apache.org
> Subject: Re: Too many open files
>  
> You can increase system open files,
> also if you compact, open files will go down.
>  
> On Mon, Jan 22, 2018 at 10:19 AM, Dor Laor <do...@scylladb.com> wrote:
> It's a high number, your compaction may run behind and thus
> many small sstables exist. However, you're also taking the
> number of network connection in the calculation (everything
> in *nix is a file). If it makes you feel better my laptop
> has 40k open files for Chrome..
>  
> On Sun, Jan 21, 2018 at 11:59 PM, Andreou, Arys (Nokia - GR/Athens) <ar...@nokia.com> wrote:
> Hi,
>  
> I keep getting a “Last error: Too many open files” followed by a list of node IPs.
> The output of “lsof -n|grep java|wc -l” is about 674970 on each node.
>  
> What is a normal number of open files?
>  
> Thank you.
>  
>  
>  

RE: Too many open files

Posted by "Andreou, Arys (Nokia - GR/Athens)" <ar...@nokia.com>.
It turns out it was a mistake in the client’s implementation.
The session was created for each request but it was shut down, so all the connections were left open.
I only needed to execute a cluste.shutdown() once the request was over.

I do have a follow up question though.
Is it better to have a global session object or to create it and shut it down for every request?


From: niki@photonhost.com [mailto:niki@photonhost.com] On Behalf Of Nikolay Mihaylov
Sent: Monday, January 22, 2018 11:47 AM
To: user@cassandra.apache.org
Subject: Re: Too many open files

You can increase system open files,
also if you compact, open files will go down.

On Mon, Jan 22, 2018 at 10:19 AM, Dor Laor <do...@scylladb.com>> wrote:
It's a high number, your compaction may run behind and thus
many small sstables exist. However, you're also taking the
number of network connection in the calculation (everything
in *nix is a file). If it makes you feel better my laptop
has 40k open files for Chrome..

On Sun, Jan 21, 2018 at 11:59 PM, Andreou, Arys (Nokia - GR/Athens) <ar...@nokia.com>> wrote:
Hi,

I keep getting a “Last error: Too many open files” followed by a list of node IPs.
The output of “lsof -n|grep java|wc -l” is about 674970 on each node.

What is a normal number of open files?

Thank you.




Re: Too many open files

Posted by Nikolay Mihaylov <nm...@nmmm.nu>.
You can increase system open files,
also if you compact, open files will go down.

On Mon, Jan 22, 2018 at 10:19 AM, Dor Laor <do...@scylladb.com> wrote:

> It's a high number, your compaction may run behind and thus
> many small sstables exist. However, you're also taking the
> number of network connection in the calculation (everything
> in *nix is a file). If it makes you feel better my laptop
> has 40k open files for Chrome..
>
> On Sun, Jan 21, 2018 at 11:59 PM, Andreou, Arys (Nokia - GR/Athens) <
> arys.andreou@nokia.com> wrote:
>
>> Hi,
>>
>>
>>
>> I keep getting a “Last error: Too many open files” followed by a list of
>> node IPs.
>>
>> The output of “lsof -n|grep java|wc -l” is about 674970 on each node.
>>
>>
>>
>> What is a normal number of open files?
>>
>>
>>
>> Thank you.
>>
>>
>>
>
>

Re: Too many open files

Posted by Dor Laor <do...@scylladb.com>.
It's a high number, your compaction may run behind and thus
many small sstables exist. However, you're also taking the
number of network connection in the calculation (everything
in *nix is a file). If it makes you feel better my laptop
has 40k open files for Chrome..

On Sun, Jan 21, 2018 at 11:59 PM, Andreou, Arys (Nokia - GR/Athens) <
arys.andreou@nokia.com> wrote:

> Hi,
>
>
>
> I keep getting a “Last error: Too many open files” followed by a list of
> node IPs.
>
> The output of “lsof -n|grep java|wc -l” is about 674970 on each node.
>
>
>
> What is a normal number of open files?
>
>
>
> Thank you.
>
>
>