Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having some issues with "too many clients" and I tried to change the max_connections param (currently 100). I tried to set some value like 300, but when I restart the service, I got this

postgresql.service - LEGACY unit for "postgresql" rc script
          Loaded: loaded (/etc/rc.conf)
          Active: failed (Result: exit-code) since Mon 2013-02-18 15:55:37 BRT; 1min 8s ago
            Docs: man:arch-daemons(8)
         Process: 7216 ExecStop=/etc/rc.d/postgresql stop (code=exited, status=0/SUCCESS)
         Process: 8375 ExecStart=/etc/rc.d/postgresql start (code=exited, status=1/FAILURE)
         Process: 8372 ExecStartPre=/usr/bin/echo WARNING: A legacy rc script is being used. Consider removing this from your DAEMONS array and enabling a native systemd service instead. (code=exited, status=0/SUCCESS)
        Main PID: 19616 (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/postgresql.service

Feb 18 15:55:32 gtsserver echo[8372]: WARNING: A legacy rc script is being used. Consider removing this from y...tead.
Feb 18 15:55:32 gtsserver su[8381]: (to postgres) root on none
Feb 18 15:55:32 gtsserver su[8381]: pam_unix(su-l:session): session opened for user postgres by (uid=0)
Feb 18 15:55:37 gtsserver postgresql[8375]: :: Starting PostgreSQL    [BUSY] pg_ctl: could not start server
Feb 18 15:55:37 gtsserver postgresql[8375]: Examine the log output.
Feb 18 15:55:37 gtsserver postgresql[8375]: [FAIL]
Feb 18 15:55:37 gtsserver systemd[1]: postgresql.service: control process exited, code=exited status=1
Feb 18 15:55:37 gtsserver systemd[1]: Failed to start LEGACY unit for "postgresql" rc script.
Feb 18 15:55:37 gtsserver systemd[1]: Unit postgresql.service entered failed state

Tried with 150, same behavior...
It happens the same error if I change shared buffer (currently 24), to something like 32.
The server is a 8GB arch linux Linux gtsserver 3.7.8-1-ck #1 SMP PREEMPT Thu Feb 14 19:14:20 EST 2013 x86_64 GNU/Linux

share|improve this question
1  
Have you followed the "Examine the log output." advice? Also you're trying to eliminate the symptoms most probably without looking for the root cause. – Milen A. Radev Feb 18 '13 at 19:43
    
actually, I'm asking about the root cause...also, i didn't found anything on logs (/var/log/) – Luiz E. Feb 18 '13 at 19:52
    
I'll try to dig the log files again, but right now, I can't restart the server (it is the prod. server) – Luiz E. Feb 18 '13 at 19:57
4  
@LuizE: You probably need to increase your kernel shmmax, that's a common problem when increasing capacity in postgres.conf. See Managing Kernel Resources. But you should find these logs to be sure and know the exact allocation size that failed. – Daniel Vérité Feb 18 '13 at 20:31
    
Thank you, I'll take a look – Luiz E. Feb 18 '13 at 20:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.