| View previous topic :: View next topic |
| Author |
Message |
Bill Guest
|
Posted: Fri Mar 31, 2006 1:46 pm Post subject: Can't connect to MySQL server |
|
|
The Thyme calendar works, but occasionally I get this error:
-----------------------------------------------------------------
_ERROR_: class.mysql.php :: _connect() :: Can't connect to MySQL server on 'mysql3.brinkster.com' (10061)
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\Sites\Single28\wjbushnell\webroot\lemolobeach\calendar\include\classes\sql\class.mysql.php on line 72
_ERROR_: class.mysql.php :: query() ::
select variable, setting from thyme_GlobalSettings
------------------------------------------------------------------
When I open the page, which is on www.lemolobeach.com, it pauses for 10-20 seconds and then flashes series of codes and then the above error is displayed. This error page continues with a long list of errors below a login screen.
Could it be that someone else is accessing the calendar. I used to get this error when I was building the page and then I started making sure I logged out each time and that seemed to solve the problem. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Fri Mar 31, 2006 2:17 pm Post subject: |
|
|
Hi Bill,
This means that every once in a while, PHP can not connect to the database server. I notice your site runs both PHP and ASP (which is fine). How does the rest of your site run? Does it also connect to the MySQL server? |
|
| Back to top |
|
 |
Bill Guest
|
Posted: Fri Mar 31, 2006 2:56 pm Post subject: |
|
|
| Thyme is the only part of my site that uses the MySQL database, so it runs fine. Could having the calendar in an IFrame be causing the problem? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Fri Mar 31, 2006 3:00 pm Post subject: |
|
|
Hi Bill,
It may if your hosting provider sets a hard limit on the number of MySQL connections per process. Try this:
edit include/classes/sql/class.mysql.php
Search / Replace "mysql_connect" with "mysql_pconnect" |
|
| Back to top |
|
 |
Bill Guest
|
Posted: Fri Mar 31, 2006 3:10 pm Post subject: |
|
|
| I don't find "mysql_connect" in that file. I see "_connect" |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Fri Mar 31, 2006 3:18 pm Post subject: |
|
|
We'll try it the other way around.
Search / Replace "mysql_pconnect" with "mysql_connect" |
|
| Back to top |
|
 |
Bill Guest
|
Posted: Fri Mar 31, 2006 3:26 pm Post subject: |
|
|
| Ian, I found it and the calendar seems be connecting faster. Guess I'll see what happens as family begin to use it more. Thanks. |
|
| Back to top |
|
 |
|