public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter J. Holzer <[email protected]>
To: [email protected]
Subject: Re: Postgresql database terminates abruptly with too many open files error
Date: Sun, 19 Jan 2025 12:06:16 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 2025-01-15 11:42:30 +0000, Sri Mrudula Attili wrote:
> The max_connections =200 and max_files_per_process =1000 as you mentioned.
>
> So should a max_files_per_process =500 helps?
>
>
> I could see from the number of connections to the databaseis not exceeding
> 20. But still these 20 are causing all the damage or using up all the
> openfiles quota.
If there are 20 processes with at most 1000 open files each, that's only
20'000 open files. So where do the other 45'536 files come from?
Use something like
lsof | awk '{print $1, $2}' | uniq -c | sort -n
to find the processes with the most open files (but be aware that lsof
reports file descriptors for each thread, so any multi-threaded programs
will be vastly inflated)
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (6+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Postgresql database terminates abruptly with too many open files error
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox