UBB.Dev
Posted By: MossY Hosting being suspended due to sql errors :( - 10/12/2006 8:44 AM
Help.... my host has shut me down for the following reason -

Quote
Dear Customer,

There is a problem with your forum script;

| 2475 | blighty_forum | localhost | blighty_forum | Query | 156 | Sending data |
| 2488 | blighty_forum | localhost | blighty_forum | Query | 153 | Locked |
| 2518 | blighty_forum | localhost | blighty_forum | Query | 134 | Locked |
| 2584 | blighty_forum | localhost | blighty_forum | Query | 78 | Locked |


Your script is keeping database connections open and not closing them. The numbers 156, 153, 134, 78 are all times, in seconds that a process from your account is running. These should never be more than a few seconds.

After suspending your account these processes were killed. and the CPU usuage returned from 80% down to the usual 3%CPU usage. Had the MySQL services not been restarted the server would have crashed due to your script not functioning correctly.

any ideas/help.. PLEASE... running UBB Threads 6.??
do you enable persistent connections in the admin settings? Wich version you are running excactly?
Posted By: MossY Re: Hosting being suspended due to sql errors :( - 10/12/2006 10:21 AM
where is the enable persistant connections option?

i think it is 6.5 ... but i cant get in to it at the moment as its suspended frown
DO NOT use pconnections. lol. In phps' mysqli this was drop because of the number of problems it caused. If you can code ask them to send you the error log for your domain and look through it, find the script/s and make sure the database connection closes. Maybe even upgrade the sql calls the mysqli as you can clean up resources faster

$mysqli = new mysqli("db_host","db_user","db_psswd","db");
$result = $mysqli->query(select your query here);
WHILE($row = $result->fetch_assoc()){
//work done with data sets here
}
$result->close();
$mysqli->close();

To some this might look odd, this is object oreiented php using mysqli. But the main thing to notice is the 2 objects I closed.

$result->close();
This cleans up all resources used to make the query. Ram, CPU time, all cleaned up

$mysqli->close();
Closes the database connection object.

If you can't code... Get a less anal host. Interserver.net has done me very good.
if you have FTP access go to your ubbthreads directory and then to includes. You find the config.inc.php

Open this file in your editor and look for:

$config['persistent'] = "";

This is the correct string for persistent connections off. If you have any other value in this string change it.
Originally Posted by Learner
If you can't code... Get a less anal host. Interserver.net has done me very good.

lol... sounds like a plan... im a C man.. all this sql stuff is like VB to me smile
this line isnt in my config frown

$config['persistent'] = "";

should it be.. can i just add it?
Posted By: Zarzal Re: Hosting being suspended due to sql errors :( - 10/13/2006 11:15 PM
it should .... Sounds your config is modified in some way. Maybe thats the main source of your problem. Do you run 6.5.5 or less? any other version as 6.5.5 have a security hole and get hacked soon. The last mass hack changes or overwrite the config.inc.php

Check the file and compare with your backup.
ok. its 6.5.5 i am useing.
i checked back in a config.inc file from a couple of months ago... and this line still isnt there frown

can i add it? will it still be affective if i type the line in?
yes smile
(ooh, top man on my case now smile )... nice one... thats what i will do then.

ok, if this doesnt clear the fault, how do i tell which queery is holding up all the cpu time??
ok, gone for a fresh install as they suspended, then locked us out frown

i have set everything up and now im starting to put the forums back together.

But i cant setup my portal/index page. i have lost that as an option in my control panel!!! how do i get it back?? i need to enable portal... but how?
6.5.5 doesn't have an portal. What do you use? IIP? Maybe you overwrite the index.php ...
Posted By: MossY Re: Hosting being suspended due to sql errors :( - 10/15/2006 11:13 PM
yes.. IIP. is it an addition?/ i inherited the forum (well, the bloke that set it up left) so this was all in place when i took over.

do i need to install additional stuff then??
Yes, you can, in most cases, find th emodifications in the UBB.Threads 6.5.x modifications forum here, IIP being one of them.

Another option would be upgrading to UBB.Threads, it is less intensive on the database as it utilizes a caching system, and comes with a lot of the previous popular mod's as stock features (including a portal).
There are 2 Version of IIP available:
Version 6.5
Version 5.1.1

Posted By: MossY Re: Hosting being suspended due to sql errors :( - 10/17/2006 12:07 AM
yup, found them.. cheers tho, nice one...

ok, almost done smile...

one last question. which file do i edit to edit the navigation bar - you know... the one that says stuff like "Portal Page Forum List My Stuff User List Calendar Active Topics Search FAQ" along the top of the forums...



last question... honest smile
Posted By: Gizmo Re: Hosting being suspended due to sql errors :( - 10/17/2006 12:23 AM
In .T7 it's through the template editor on the header.tpl file; on previous versions of .T, i'm not entirely sure as I never ran one...
in V6.5.5 its templates/default/ubbt_registerednav.tmpl and templates/default/ubbt_unregisterednav.tmpl
im running 6.5.5 but i dont see it in the header.tplt file frown
oh damn.... an error frown

ok, when i go to edit display settings, i get this...

Fatal error: Cannot redeclare class mailer in /home/blightyr/public_html/ubbt.inc.php on line 255


any ideas?? (oh, and i had some early problems with getting the language out of the code... (so i hard coded 'english' in some places - could this be my problem??
© UBB.Developers