Search Postgresql Archives

Re: Postgresql database terminates abruptly with too many open files error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
|_|_) |                    |
| |   | hjp@xxxxxx         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux