Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tY1nB-001lJj-VU for pgsql-general@arkaria.postgresql.org; Wed, 15 Jan 2025 11:42:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tY1nA-00AfCi-Fi for pgsql-general@arkaria.postgresql.org; Wed, 15 Jan 2025 11:42:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tY1nA-00Af7i-47 for pgsql-general@lists.postgresql.org; Wed, 15 Jan 2025 11:42:36 +0000 Received: from ironport1.embl.de ([194.94.44.73]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tY1n8-000WhT-27 for pgsql-general@postgresql.org; Wed, 15 Jan 2025 11:42:35 +0000 Received: from hl-outgoing01.ebi.ac.uk ([193.62.192.137]) by ironport1.embl.de with ESMTP; 15 Jan 2025 12:42:30 +0100 Received: from [172.23.50.110] (unknown [172.23.50.110]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sri) by hl-outgoing01.ebi.ac.uk (Postfix) with ESMTPSA id 95673355D; Wed, 15 Jan 2025 11:42:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ebi.ac.uk; s=ebinew; t=1736941350; bh=W+UP4+Yke4SnR8IAkcAiFYeb931nbJbmu8R76/YohJQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IRoGJ1Rjta0xCDPU2BvCM7S1lAWJr2ZXvb1NATec1NQQUoYEFQgXDNqjdOwHSL6vL r5NTcDG71SCCqqN1U09CTXeHtSgHJEdTJA3BPnIAtF3cqcNViDH1rEx5yAEaAeytF9 wzgNP4wCLTSbA5gnl31r2DVRrGZknRY6gXCm+mHM= Message-ID: <9b69fcc6-dca1-4671-af00-b250f154fb14@ebi.ac.uk> Date: Wed, 15 Jan 2025 11:42:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Postgresql database terminates abruptly with too many open files error To: Tom Lane Cc: pgsql-general@postgresql.org References: <0af98214-3c2a-43e5-9bbf-ddd79b85ea93@ebi.ac.uk> <709d5fa0-85e1-40a2-a6a4-11040f4e5b62@ebi.ac.uk> <679341.1736864393@sss.pgh.pa.us> Content-Language: en-US From: Sri Mrudula Attili In-Reply-To: <679341.1736864393@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Tom, 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. Thanks, Sri On 14/01/2025 14:19, Tom Lane wrote: > Sri Mrudula Attili writes: >>  We have a postgresql VDB(virtual database- Delphix) that keeps >> terminating due "to too many open files". > What do you have max_connections set to, and how many actually-live > server processes are there typically? > >> The number of allowed openfiles at OS level are 65000. > I'm suspecting that you either need to increase that, decrease > max_files_per_process (which defaults to 1000), or decrease > max_connections. > > regards, tom lane