Server pegging CPU every day, requiring restart

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Server pegging CPU every day, requiring restart

Postby ryanparrish » Wed Feb 29, 2012 11:29 pm

We are having an issue where about once every day or day & a half, the servoy server process will peg the server CPU until we relent and restart the server, sometimes after 15min of trying to find the issue. During this time smart clients will be unresponsive, the servoy-admin page will slow to a crawl and the web clients will start to timeout. I've attached the dump from the admin page, if someone can make some sense of what the issue may be I would (and our customers) appreciate it. I also attached a dump from right after the restart so you can see its 'clean' state.
Attachments
restart.txt
stack dump right after server is restarted
(64.13 KiB) Downloaded 196 times
frozen.txt
Stack dump while server is maxed.
(180.42 KiB) Downloaded 193 times
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: Server pegging CPU every day, requiring restart

Postby chico » Thu Mar 01, 2012 5:29 am

We were having a similar problem and learned that it was a databaseManager.recalculate(foundsetofsomesort) which was the culprit.

When we removed it, the problem went away. We'd really notice the slowdown as the number of clients connected picked up.

This might be obvious, but it wasn't to us at the time.

FYI, I have not looked at your stack dumps as I'd have no idea what they would mean. :P
--------------------------------------------
Servoy Version: 6.0.3
DB: MySQL 5.1
Win XP/Vista/7 - Java 5u20 / 6u22
OS X - 10.6.5 - Java 5/6 update 3
chico
 
Posts: 271
Joined: Tue Nov 20, 2007 6:34 am

Re: Server pegging CPU every day, requiring restart

Postby Jan Aleman » Thu Mar 01, 2012 3:30 pm

chico wrote:We were having a similar problem and learned that it was a databaseManager.recalculate(foundsetofsomesort) which was the culprit.

Or perhaps not reading the docs is the culprit? ;-)

http://wiki.servoy.com/display/public/D ... ecalculate

from the docs/sample code: " please use with care, this can be expensive!"
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Re: Server pegging CPU every day, requiring restart

Postby chico » Thu Mar 01, 2012 4:02 pm

Jan, I would agree that we were the culprit, which is the case most of the time :) But see our SSL post, we're stumped there:

viewtopic.php?f=5&t=17828
--------------------------------------------
Servoy Version: 6.0.3
DB: MySQL 5.1
Win XP/Vista/7 - Java 5u20 / 6u22
OS X - 10.6.5 - Java 5/6 update 3
chico
 
Posts: 271
Joined: Tue Nov 20, 2007 6:34 am

Re: Server pegging CPU every day, requiring restart

Postby ryanparrish » Thu Mar 01, 2012 5:51 pm

We most certainly use a sprinkling of .recalculate() throughout our solutions, and try to be conservative with its usage. I did foolishly forget to mention that we where previously on servoy 5.2.8 in production and these issues arose when we moved production to 5.2.12 (development had been on 5.2.11/12 for a while). Of course their had also been code changes in the development cycle when we went to 5.2.12, so, that doesn't really nail down anything.
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: Server pegging CPU every day, requiring restart

Postby dpearce » Wed Mar 07, 2012 9:50 am

I have had these issues with one solution, which have stayed since Servoy 3.5.

I am sure it is my fault, but tracking down the issue is very hard. I don't use .recalculate, but find that the server CPU usage from servoy goes up and up and up until reboot of the server, which we have been doing every night in order to bring it back down.

However restarting Servoy sorts it out, so we now use CURL to do this curl -o result.html http://xxxxxx:xxxxxxxxxxx@localhost:808 ... dmin/?rf=1

rather than restarting the server.

The main culprits maybe undeclared global variables or memory leakage from a plugin, but I find the a daily restart of servoy keeps it under control.

I have no idea how to try and find the exact culprit though!

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 8 guests

cron