11
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/18 16:24

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


RESOLVED:

The core of the problem was an httpd issue. As fair warning to anyone running as powerful a CMS as Xoops, you will need to look towards a dedicated server as you push the 2GB bandwidth / month barrier. A large client / thread ratio was the cause, where httpd would bind up to the point it could simply no longer handle requests. Coupled with the small delay in SQL, multiplied by 800,000 hits in a day, and it was no wonder we folded like an empty winerack.

I'll updated the first post to mark its resolved status, and hopefully this will help others who are having similar problems. Be weary of your server load, XOOPS will consume a lot of resources during peak traffic.

Lesson well learned.



12
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/15 1:56

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


And moving right along, here's an update.

It appears that the foum module was bucling simple due to its high number of SQL calls. We turned on our other VERY intense service (our bittorrent tracker) and watched the server fold like an accordion. So something is buckling under the very heavy stress.

My host swears it isn't their server, but we have had a 400% jump in traffic lately due to an announcement on a popular web site. On Wed. we have a dedicated server with our name on it that will be ready (dual 2.66 xenon + 1gb ram + sysadmin we can call on a phone) so we will see if that helps.

If anyone has any ideas for how to verify it is simply a site overload, let me know as we are starting to lean more towards raw traffic being the problem. (Though that amount of XOOPS traffic in our forum would do it too)



13
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 22:48

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


Quote:

bd_csmc wrote:
the fact that you're having such a strange fatal error in one area of the site, suggests there's more wrong than just the forum module.


Well, we currently have the site limping with the following:

News
Who's Online
A Few Custom Blocks

and have had 5 hours uptime on it. Every time we enable the forums though, stuff goes haywire. o_o

This remains so VERY perplexing. When I get home, I will run myisamchk on the forums tables to see if that is causing it, though I don't think that is the case.



14
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 22:26

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


Switching to MySQL Debug didn't solve anything since the page refuses to load due to a php fatal error. (with persistant connections turned off)

We dumped the database and restored from a backup without any success, so we don't think it is a corruption issue. It seems to be directly connected to newbb. Though which part of it I'm not sure. We reenabled the forum module, and sure enough, after a few minutes, 5 httpd threads took 20% each of the CPU, bringing the system down.



15
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 21:28

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


I put an echo statement in for the SQL right before the error line, and here's the SQL being generated

SELECT * FROM xoops_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASCSELECT sess_data FROM xoops_session WHERE sess_id = '0a48a6ec37b32bf2148c1a05acd2b1b2'

SELECT * FROM xoops_users WHERE uid=1

SELECT COUNT(*) FROM xoops_session WHERE sess_id='0a48a6ec37b32bf2148c1a05acd2b1b2

UPDATE xoops_session SET sess_updated = 1087253178, sess_data = 'xoopsUserId|s:1:"1";xoopsUserGroups|a:3:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"4";}' WHERE sess_id = '0a48a6ec37b32bf2148c1a05acd2b1b2'


(EDIT: removed code tags that were stretching page)



16
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 21:17

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


/class/database/mysqldatabase.php on line 226

I wish it would give me more details but it doesn't. That's the database QueryF function. >_< I'm not quite sure where to dump some debug code since I am still learning the XOOPS core.



17
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 20:57

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


It is caused by the main page (index.php) which loads the news.

Had to have the PHP Debug enabled, else it generates a blank page.

I also can't find the advanced caching you had mentioned before. Currently browsing the repository on sourceforge.



18
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 20:45

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


I think we are getting closer.

mainfile.php
define('XOOPS_DB_PCONNECT', 0);

generates the following

Warning: mysql_query(): 9 is not a valid MySQL-Link resource in /home/kaizoku/public_htwtf/class/database/mysqldatabase.php on line 226

Fatal error: Call to a member function on a non-object in /home/kaizoku/public_htwtf/include/notification_functions.php on line 95


Of interesting note, this is new since the problem started happening. Any thoughts would be helpful. (I'll wait on newbb 2 then, I didn't know it was that SQL intensive. I will, however, be looking to go to 2.0.7 in the near future.)


(EDIT: Removed code tags that were stretching page)



19
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 20:17

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


It is tied to the newbb module. We haven't pinned down what exactly, but enabling this module will (after about an hour) generate the server spikes that are crippling at best.

Hopefully I'll be able to track it a bit more this evening. I will probably also try the newest newbb off of dev.xoops.org to see if that solves anything.

for bd_csmc: Yeah, when we are disabled, those spikes go away. I have tried disabling persistant connections before, but it didn't seem to help.



20
Jakobo
Re: Xoops causes httpd bind, cpu use jumps to 40+%
  • 2004/6/14 14:18

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


Turned all caching off: no improvement. Persistent Connections are on, gzip compression is currently disabled.

The current server software is Apache 1.3.28 which while I'be pointed out to them is old, they claim is stable.

We have at this point rolled back to the XOOPS default install (with our user DB) and have disabled most of the modules (except for news). We'll see from here what happens.




TopTop
« 1 (2) 3 4 5 6 »



Login

Who's Online

189 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 189


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits