Postgres

Asim Baksh's Avatar

Asim Baksh

18 Feb, 2010 10:16 PM via web

Hi There,

I am curious to know how you implement Postgres, what ports you use, etc. I am working for Marketcircle, the makers of Daylite and Billings. We also use Postgres - however we use a hidden instance, with registered ports, which has been tested against other applications that use Postgres. However whenever a customer of ours (or internal) testing installs this application, we are getting locked out of our application, and even an uninstall of Lithium doesn't seem to do help.

Please advise.

Thanks,
Asim

  1. Support Staff 2 Posted by James Wilson on 21 Feb, 2010 10:40 AM

    James Wilson's Avatar

    Hi Asim,

    We use postgres on port 51132.

    I'd be inclined to say it's not the port that's the problem but rather than use of shared memory. Two instances of PostgreSQL seldom plays nicely on any host with a limited amount of sysV IPC shared memory such as Mac OS X.

    When Lithium is installed and your app fails, do you get any logging messages from the PostgreSQL instance as to why it's failing to start?

  2. 3 Posted by Asim on 22 Feb, 2010 02:21 AM

    Asim's Avatar

    Hi James,

    Thank you for responding. We were wondering if you've changed any system files regarding memory limits during installation? We also agree that ports is not the issue, as after uninstalling Lithium, we are still facing the problem with our own application.

    • Asim
  3. Support Staff 4 Posted by James Wilson on 22 Feb, 2010 05:22 AM

    James Wilson's Avatar

    Hi Asin,

    The postinstall script for Lithium Core does perform the following SysV tweaks:

    ` echo "" >> /etc/sysctl.conf echo "#Lithium 5.0.0 sysctl.conf additions" >> /etc/sysctl.conf echo "kern.sysv.shmmax=524288000" >> /etc/sysctl.conf echo "kern.sysv.shmmin=1" >> /etc/sysctl.conf echo "kern.sysv.shmmni=64" >> /etc/sysctl.conf echo "kern.sysv.shmseg=16" >> /etc/sysctl.conf echo "kern.sysv.semmns=130" >> /etc/sysctl.conf echo "kern.sysv.shmall=131072000" >> /etc/sysctl.conf echo "kern.sysv.maxproc=4096" >> /etc/sysctl.conf echo "kern.maxprocperuid=1024" >> /etc/sysctl.conf

    sysctl -w kern.sysv.shmmax=524288000 sysctl -w kern.sysv.shmmin=1 sysctl -w kern.sysv.shmmni=64 sysctl -w kern.sysv.shmseg=16 sysctl -w kern.sysv.semmns=130 sysctl -w kern.sysv.shmall=131072000 sysctl -w kern.sysv.maxproc=4096 sysctl -w kern.maxprocperuid=1024 `

  4. Support Staff 5 Posted by James Wilson on 22 Feb, 2010 05:22 AM

    James Wilson's Avatar

    Trying again for different formatting:

    echo "" >> /etc/sysctl.conf echo "#Lithium 5.0.0 sysctl.conf additions" >> /etc/sysctl.conf echo "kern.sysv.shmmax=524288000" >> /etc/sysctl.conf echo "kern.sysv.shmmin=1" >> /etc/sysctl.conf echo "kern.sysv.shmmni=64" >> /etc/sysctl.conf echo "kern.sysv.shmseg=16" >> /etc/sysctl.conf echo "kern.sysv.semmns=130" >> /etc/sysctl.conf echo "kern.sysv.shmall=131072000" >> /etc/sysctl.conf echo "kern.sysv.maxproc=4096" >> /etc/sysctl.conf echo "kern.maxprocperuid=1024" >> /etc/sysctl.conf

    sysctl -w kern.sysv.shmmax=524288000 sysctl -w kern.sysv.shmmin=1 sysctl -w kern.sysv.shmmni=64 sysctl -w kern.sysv.shmseg=16 sysctl -w kern.sysv.semmns=130 sysctl -w kern.sysv.shmall=131072000 sysctl -w kern.sysv.maxproc=4096 sysctl -w kern.maxprocperuid=1024

  5. 6 Posted by Jordan Eunson on 26 Feb, 2010 08:05 PM

    Jordan Eunson's Avatar

    Hi James,

    I believe I'm one of their customers that's having this problem. I'm a good friend of Mark's whom I assume you know quite well. Basically if Lithium is installed, even if it's not running the daylite won't launch, it hangs at "Initailizing the daylite storage enviroment" and then bails out on an error 300

    I removed your sysctl settings listed above and restarted the server and that fixed it. I'm glad I figured this out on my own cause their support staff is slow....

  6. 7 Posted by Asim Baksh on 26 Feb, 2010 08:11 PM

    Asim Baksh's Avatar

    This is very interesting. We will give it a shot and repost the results here.

  7. Support Staff 8 Posted by James Wilson on 26 Feb, 2010 08:18 PM

    James Wilson's Avatar

    Hi Jordan,

    That is very strange indeed... those sysctl changes are all aimed at ensuring PostgreSQL can run by ensuring there's ample SysV IPC shared memory, semaphores, etc.

    It would be interesting to do a line-by-line removal to see which one was the culprit.

    In the mean time, it's another notch in the "can't wait to go to MySQL" belt.

  8. 9 Posted by Jordan Eunson on 26 Feb, 2010 09:15 PM

    Jordan Eunson's Avatar

    If you don't mind I posted this topic my blog

    http://jordaneunson.com/?p=496

  9. 10 Posted by Jordan Eunson on 26 Feb, 2010 11:33 PM

    Jordan Eunson's Avatar

    Ok just so you know, once the daylite database was created and setup I placed your sysctl options back in place and restarted my server, both lithium and daylite are A-OK.

    Hey MarketCircle! It would be really great to get someone on your inside to follow up with me and resolve my unhappiness with your product support. I'd really appreciate a discount on the software because despite this hiccup I must say Daylite is amazing and I would love to deploy it in my infrastructure.

  10. Support Staff 11 Posted by James Wilson on 28 Feb, 2010 04:13 AM

    James Wilson's Avatar

    Hi Jordan,

    I'll copy the same on the blog post:

    With those lines removed from the sysctl, so long as Lithium Core starts properly and is operating you should be free of any further issue.

    To clarify, those extra lines are added as performance tweaks for large Lithium installations and they were also somewhat of a prerequisite for older versions to run on Mac OS X 10.5.

    Let me know if you do run into any problem and we can work on a solution that keeps both Lithium and Daylite working.

  11. James Wilson closed this discussion on 28 Feb, 2010 04:13 AM.

Comments are currently closed for this discussion. You can start a new one.