11
Mithrandir
Re: Xoops causes httpd bind, cpu use jumps to 40+%

Also, the newbb in it's current state is not optimised towards e.g. SQL queries - afaik there are still far too many, which could be reduced immensely, so I don't think it would improve your situation.

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

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


mith is correct. last i heard, there were roughly 35-45 queries for an avg page, in regular newbb

for the same page in the updated newbb, that number is the same + 100

somewhere around there, so it's not efficient at all, lol :-X


although, really, i doubt it's MySQL that is the problem, since it's apache that is hanging. hmm.. gotta be a php loop or something, or maybe a bad sql query looping via php

13
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)

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

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


that's weird, i've installed multiple XOOPS sites (usually for testing), i always leave persistent conn. disabled, never seen an error like that

what page were you viewing when that error occurred? did you have php debug or MySQL debug enabled?


have you considered that some files might have gotten corrupted, possibly during a bad transfer or server shutdown? (in which case you need to re-upload)

15
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.

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

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


sorry, it was under patches :-X

http://sourceforge.net/tracker/index.php?func=detail&aid=947883&group_id=41586&atid=430842


what is on the lines shown in the error printouts? (what lines of code are referenced?)

17
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.

18
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)

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

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


switch debug mode to MySQL

seems your database corrupted

20
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.

Login

Who's Online

166 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 166


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