PEAK XOOPS - Database connection - Xoops Protector 2.5 beta 02 in englishin japanese

Database connection - Xoops Protector 2.5 beta 02

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2005/8/9 23:36
tl  »°Åù·³Áâ   Posts: 84
GIJOE:

I have a site that is having database connection problems in the last two days. One of the error messages is about reliable IPs (I added several IPs in the preference).

Once I had commented out precheck and postcheck in mainfile.php, it seems that the site would return back to normal.

I am not sure if the connection problem is related to Protector. Could you please look into it? I really hate to disable Protector. FYI, another site without reliable IPs in the preference seems to be fine.

Thanks.

tl
Could the way protector writing to the session table be a problem?
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/8/10 6:26
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi tl.

There are two possibilities.

- a bug about "reliable IPs".
- a restriction of database connections

(The latter means the server disables multiple connections from PHP to MySQL.
You can check by inserting mysql_close( $conn ); into the last of precheck.inc.php)


To distinguish them, you'd better make "reliable IPs" blank once.

Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/8/10 9:31
tl  »°Åù·³Áâ   Posts: 84
GIJOE:
I did remove the reliable IPs in the reference and it did not help much.

My web hosting company offers separate mysql database servers. I am not aware of any database connection restrictions.

I added mysql_close( $conn );
at the end of function protector_prepare()

no error message

if I added it at the end of the file
Notice: Undefined variable: conn in /.../protector/include/precheck.inc.php on line 75

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /.../protector/include/precheck.inc.php on line 75


After having commented out precheck and postcheck in mainfile.php, the site runs faster and has not had any connection problems so far. It seems that Protector is having problems with my host in some mysterious ways. I really hate to lose Protector.

Thanks for looking into it.
tl
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/8/10 19:17
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi tl.

Quote:
I did remove the reliable IPs in the reference and it did not help much.
OK.
It might be an issue of mysql connections.

Quote:
I added mysql_close( $conn );
at the end of function protector_prepare()

no error message
I meant this.

Have you experienced "slowing down" after this modification ?
It sounds that connecting with MySQL is slow in the host.

I can advise only a little sentence.

- enabling pconnect

- adding indexes (Have you tried to update the module?)

Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2005/8/10 21:55
tl  »°Åù·³Áâ   Posts: 84
GIJOE:
Thanks for the suggestions. I do have indexing on database tables. I tried pconnect and it seemed to be working fine but the connection then slowed down (pause over 2-3 seconds) after a short time period with Protector enabled. The site would run full speed after disabling Protector.

FYI, my host does have database connection limitations (15 concurrent connections). The site is not very busy. I did not have any major problems previously with Protector. I started to have slowdown problems after upgrading to Protector 2.40 and beyond.

For now, I will have to run without Protector.

Thank you for your help.

tl
Votes:2 Average:5.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!