pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
8+ messages / 5 participants
[nested] [flat]

* BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
@ 2016-04-19 12:30 nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: nathanmascitelli@geotab.com @ 2016-04-19 12:30 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14101
Logged by:          Nathan Mascitelli
Email address:      nathanmascitelli@geotab.com
PostgreSQL version: 9.4.5
Operating system:   Windows Server 2012 R2
Description:        

Hello,

I am running Postgres 9.4 on Windows Server 2012. I have had postgres crash
a few times with the following error:

    FATAL:  could not reattach to shared memory (key=00000000000000D0,
addr=00000001405E0000): error code 1455

Looking around
(http://stackoverflow.com/questions/24614314/postgresql-8-3-7-fatal-could-not-reattach-to-shared-memo...)
it looks like this error was supposed to be fixed back in 8.3.

Around the time of the crash it appears to have free RAM available.

My server specs:

    OS: Windows Server 2012 x64
    CPU: Intel Xeon CPU 2.30GHz (x2)
    RAM: 52GB
    Postgres: 9.4.5

Some settings from postgres:

    shared_buffers = 512MB
    effective_cache_size = 39GB
    work_mem = 90MB
    maintenance_work_mem = 2000MB

Can anyone suggest what might be causing the crash? If you need more info
please let me know.

Thanks,

Nathan


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
@ 2016-04-20 03:57 ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2016-04-20 03:57 UTC (permalink / raw)
  To: nathanmascitelli@geotab.com; +Cc: pgsql-bugs

nathanmascitelli@geotab.com writes:
> I am running Postgres 9.4 on Windows Server 2012. I have had postgres crash
> a few times with the following error:
>     FATAL:  could not reattach to shared memory (key=00000000000000D0,
> addr=00000001405E0000): error code 1455

Hm, that's an odd one.  According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx
that is

ERROR_COMMITMENT_LIMIT
1455 (0x5AF)
The paging file is too small for this operation to complete.

which suggests that this is a resource-exhaustion type of problem.
How many backend processes are you trying to run concurrently,
and what else is running on the machine?

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-04-20 12:03   ` Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 14:09     ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Mascitelli @ 2016-04-20 12:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hi Tom,​

The machine has the postgres server and our application server on it. There
are ​around 300 databases and typically ~1000 connections. At the time of
the crash there was free RAM and disk space on the server.

Is there any other information I can give you?

Thanks,

*Nathan Mascitelli*
Geotab Inc.
Software Developer | B. Eng Engineering Physics

[Direct] *+1 (289) 681-1005*
[Toll-Free] *+1 (877) 436-8221*
[Visit] www.geotab.com
Twitter <http://twitter.com/geotab; | Facebook
<http://www.facebook.com/geotab; | YouTube <http://www.youtube.com/mygeotab;
 | LinkedIn
<http://www.linkedin.com/company/102661?trk=tyah&trkInfo=tarId:1403199250031,tas:geotab,idx:2-1-3;


On Tue, Apr 19, 2016 at 11:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> nathanmascitelli@geotab.com writes:
> > I am running Postgres 9.4 on Windows Server 2012. I have had postgres
> crash
> > a few times with the following error:
> >     FATAL:  could not reattach to shared memory (key=00000000000000D0,
> > addr=00000001405E0000): error code 1455
>
> Hm, that's an odd one.  According to
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx
> that is
>
> ERROR_COMMITMENT_LIMIT
> 1455 (0x5AF)
> The paging file is too small for this operation to complete.
>
> which suggests that this is a resource-exhaustion type of problem.
> How many backend processes are you trying to run concurrently,
> and what else is running on the machine?
>
>                         regards, tom lane
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
@ 2016-04-20 14:09     ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 14:31       ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover John R Pierce <pierce@hogranch.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2016-04-20 14:09 UTC (permalink / raw)
  To: Nathan Mascitelli <nathanmascitelli@geotab.com>; +Cc: pgsql-bugs

Nathan Mascitelli <nathanmascitelli@geotab.com> writes:
> The machine has the postgres server and our application server on it. There
> are ​around 300 databases and typically ~1000 connections. At the time of
> the crash there was free RAM and disk space on the server.

You're a braver man than I, to trust Windows with a 1000-connection
server.  But anyway, if the backend count is that high it's far from
surprising that you hit some Windows resource limit or other.  It's
widely considered best practice to use a connection pooler to limit
the number of backends to something a lot less than that, regardless
of platform.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 14:09     ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-04-20 14:31       ` John R Pierce <pierce@hogranch.com>
  2016-04-20 15:17         ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  0 siblings, 1 reply; 8+ messages in thread

From: John R Pierce @ 2016-04-20 14:31 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: Nathan Mascitelli <nathanmascitelli@geotab.com>

On 4/20/2016 7:09 AM, Tom Lane wrote:
> Nathan Mascitelli<nathanmascitelli@geotab.com>  writes:
>> >The machine has the postgres server and our application server on it. There
>> >are ​around 300 databases and typically ~1000 connections. At the time of
>> >the crash there was free RAM and disk space on the server.
> You're a braver man than I, to trust Windows with a 1000-connection
> server.  But anyway, if the backend count is that high it's far from
> surprising that you hit some Windows resource limit or other.  It's
> widely considered best practice to use a connection pooler to limit
> the number of backends to something a lot less than that, regardless
> of platform.

with 300 databases in use, a pooler would not be much help.   1000 
connections is an average of 3 connections per database.





-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 14:09     ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 14:31       ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover John R Pierce <pierce@hogranch.com>
@ 2016-04-20 15:17         ` Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 16:37           ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Mascitelli @ 2016-04-20 15:17 UTC (permalink / raw)
  To: John R Pierce <pierce@hogranch.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

We are using a connection pooler. On average we see 2-5 connections per
database. But it sounds like we would need to either collect connections
more aggressively or lower the number of databases/server correct?

*Nathan Mascitelli*
Geotab Inc.
Software Developer | B. Eng Engineering Physics

[Direct] *+1 (289) 681-1005*
[Toll-Free] *+1 (877) 436-8221*
[Visit] www.geotab.com
Twitter <http://twitter.com/geotab; | Facebook
<http://www.facebook.com/geotab; | YouTube <http://www.youtube.com/mygeotab;
 | LinkedIn
<http://www.linkedin.com/company/102661?trk=tyah&trkInfo=tarId:1403199250031,tas:geotab,idx:2-1-3;


On Wed, Apr 20, 2016 at 10:31 AM, John R Pierce <pierce@hogranch.com> wrote:

> On 4/20/2016 7:09 AM, Tom Lane wrote:
>
>> Nathan Mascitelli<nathanmascitelli@geotab.com>  writes:
>>
>>> >The machine has the postgres server and our application server on it.
>>> There
>>> >are ​around 300 databases and typically ~1000 connections. At the time
>>> of
>>> >the crash there was free RAM and disk space on the server.
>>>
>> You're a braver man than I, to trust Windows with a 1000-connection
>> server.  But anyway, if the backend count is that high it's far from
>> surprising that you hit some Windows resource limit or other.  It's
>> widely considered best practice to use a connection pooler to limit
>> the number of backends to something a lot less than that, regardless
>> of platform.
>>
>
> with 300 databases in use, a pooler would not be much help.   1000
> connections is an average of 3 connections per database.
>
>
>
>
>
> --
> john r pierce, recycling bits in santa cruz
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 14:09     ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 14:31       ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover John R Pierce <pierce@hogranch.com>
  2016-04-20 15:17         ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
@ 2016-04-20 16:37           ` Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-22 05:13             ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover David Gould <daveg@sonic.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Mascitelli @ 2016-04-20 16:37 UTC (permalink / raw)
  To: John R Pierce <pierce@hogranch.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

That's a good idea, I'll have to play around and see what we can do.

In your opinion would a Linux server be able to handle this setup? Would
1000 connections/processes be a problem on Linux?

Thanks,

*Nathan Mascitelli*
Geotab Inc.
Software Developer | B. Eng Engineering Physics

[Direct] *+1 (289) 681-1005*
[Toll-Free] *+1 (877) 436-8221*
[Visit] www.geotab.com
Twitter <http://twitter.com/geotab; | Facebook
<http://www.facebook.com/geotab; | YouTube <http://www.youtube.com/mygeotab;
 | LinkedIn
<http://www.linkedin.com/company/102661?trk=tyah&trkInfo=tarId:1403199250031,tas:geotab,idx:2-1-3;


On Wed, Apr 20, 2016 at 11:21 AM, John R Pierce <pierce@hogranch.com> wrote:

> On 4/20/2016 8:17 AM, Nathan Mascitelli wrote:
>
>> We are using a connection pooler. On average we see 2-5 connections per
>> database. But it sounds like we would need to either collect connections
>> more aggressively or lower the number of databases/server correct?
>>
>
>
> depending on the use case for these 300 different databases, perhaps they
> could be consolidated into 'schemas' within a smaller number of databases.
>
>
> --
> john r pierce, recycling bits in santa cruz
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover
  2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
  2016-04-20 03:57 ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 12:03   ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 14:09     ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Tom Lane <tgl@sss.pgh.pa.us>
  2016-04-20 14:31       ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover John R Pierce <pierce@hogranch.com>
  2016-04-20 15:17         ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
  2016-04-20 16:37           ` Re: BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover Nathan Mascitelli <nathanmascitelli@geotab.com>
@ 2016-04-22 05:13             ` David Gould <daveg@sonic.net>
  0 siblings, 0 replies; 8+ messages in thread

From: David Gould @ 2016-04-22 05:13 UTC (permalink / raw)
  To: Nathan Mascitelli <nathanmascitelli@geotab.com>; +Cc: John R Pierce <pierce@hogranch.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

On Wed, 20 Apr 2016 12:37:55 -0400
Nathan Mascitelli <nathanmascitelli@geotab.com> wrote:

> That's a good idea, I'll have to play around and see what we can do.
> 
> In your opinion would a Linux server be able to handle this setup? Would
> 1000 connections/processes be a problem on Linux?

As long as the machine has the resources, this is not a problem. I have
clients with 1800 to 2000 connections. It will help a bit if you configure
huge pages and you will possibly need to configure more semaphores depending
on what linux version you are on. You can contact me for details if you
actually do this.

-dg

-- 
David Gould                                   daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2016-04-22 05:13 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 12:30 BUG #14101: Postgres Service Crashes With Memory Error And Does Not Recover nathanmascitelli@geotab.com
2016-04-20 03:57 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-04-20 12:03   ` Nathan Mascitelli <nathanmascitelli@geotab.com>
2016-04-20 14:09     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-04-20 14:31       ` John R Pierce <pierce@hogranch.com>
2016-04-20 15:17         ` Nathan Mascitelli <nathanmascitelli@geotab.com>
2016-04-20 16:37           ` Nathan Mascitelli <nathanmascitelli@geotab.com>
2016-04-22 05:13             ` David Gould <daveg@sonic.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox