Re: sidewinder has one failure - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: sidewinder has one failure
Date
Msg-id CAA4eK1J5UPABRR3FQxMhABzn6Sic8bCQ+2tuZzkmFahguGGGwA@mail.gmail.com
Whole thread Raw
In response to Re: sidewinder has one failure  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: sidewinder has one failure  (Mikael Kjellström <mikael.kjellstrom@mksoft.nu>)
List pgsql-hackers
On Fri, Jan 3, 2020 at 7:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Fri, Jan 3, 2020 at 6:34 PM Mikael Kjellström
> <mikael.kjellstrom@mksoft.nu> wrote:
> >
> >
> > On 2020-01-03 13:01, Amit Kapila wrote:
> >
> > > 2020-01-02 19:51:05.687 CET [24138:3] FATAL:  insufficient file
> > > descriptors available to start server process
> > > 2020-01-02 19:51:05.687 CET [24138:4] DETAIL:  System allows 19, we
> > > need at least 20.
> > > 2020-01-02 19:51:05.687 CET [24138:5] LOG:  database system is shut down
> > >
> > > Here, I think it is clear that the failure happens because we are
> > > setting the value of max_files_per_process as 26 which is low for this
> > > machine.  It seems to me that the reason it is failing is that before
> > > reaching set_max_safe_fds, it has already seven open files.  Now, I
> > > see on my CentOS system, the value of already_open files is 3, 6 and 6
> > > respectively for versions HEAD, 12 and 10.

I debugged on HEAD and found that we are closing all the files (like
postgresql.conf, postgresql.auto.conf, etc.) that got opened before
set_max_safe_fds.  I think on HEAD the 3 already opened files are
basically stdin, stdout, stderr.   It is still not clear why on some
other versions it shows different number of already opened files.

> > >  We can easily see the
> > > number of already opened files by changing the error level from DEBUG2
> > > to LOG for elog message in set_max_safe_fds.  It is not very clear to
> > > me how many files we can expect to be kept open during startup?  Can
> > > the number vary on different setups?
> >
> > Hm, where does it get the limit from?  Is it something we set?
> >
> > Why is this machine different from everybody else when it comes to this
> > limit?
> >

Mikael, is it possible for you to set log_min_messages to DEBUG2 on
your machine and start the server.  You must see a line like:
"max_safe_fds = 984, usable_fds = 1000, already_open = 6".  Is it
possible to share that information?  This is just to confirm if the
already_open number is 7 on your machine.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Add support for automatically updating Unicode derived files
Next
From: Stephen Frost
Date:
Subject: Re: Recognizing superuser in pg_hba.conf