Fatal error: Uncaught exception 'PDOException' with message 'No Connection Established' in /home/a9791986/public_html/tree/includes/classes/class_pgv_db.php:704 Stack trace: #0 /home/a9791986/public_html/tree/includes/functions/functions_db.php(2744): PGV_DB::prepare('SELECT setting_…') #1 /home/a9791986/public_html/tree/includes/session.php(533): get_user_setting('1', 'language') #2 /home/a9791986/public_html/tree/config.php(75): require_once('/home/a9791986/…') #3 /home/a9791986/public_html/tree/index.php(29): require('/home/a9791986/…') #4 {main} thrown in /home/a9791986/public_html/tree/includes/classes/class_pgv_db.php on line 704
Mostly this happens on the Welcome Page and the Portal, when logged in. When you are anonymous the welcome page seems to work just fine, but shows different 'blocks'. If I reload the page the blocks that load are not consistent.
My only thought is that the different blocks are timing out, I am using free hosting. The PHP time limit is set to 10 even and I can not change that.
Users are confused/concerned about the errors and being family are pretty insistent that I should fix them. I'm still trying to sort out all the settings at this point.
Any suggestions as to what I can do?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Once you log in, privacy calculations apply. Get a new host that actually provides decent service and parameters. You need at least a 30 second script time, maybe more depending on the size and complexity of your gedcom.
-Stephen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stephen,
I've got similar error which occured after I moved to another server. I'm not sure what time do you mean? Some forums refer to database connection timeout and some to script one.
Anyway.. my server reports
max_execution_time=30
mysql.connect_timeout=30
On previous server it was
max_execution_time=30
mysql.connect_timeout=60
I am very suspicious about those values to be guilty because errors occur instantly after page refreshing so.. there is no 30+ sec timeout , not even 2 sec.
Also configuration check reporting "You may not be able to run all functions on large databases with many individuals.
Your maximum time limit is 30" does not seem to refer to my "large" database because it actually consists of only 108 individuals.
The error occurs ONLY on MyGedView page, ALWAYS on right hand side panels. Page reloads quickly (1-2 sec) almost instantly and errors occur randomly (appr 3 errors on every 4 refreshes)
Any hint?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Both server memory and timeout limits may cause errors in PGV. I am surprised that a 108 person site causes problems. 108 is supposed to be a lucky number - another superstition bites the dust. Do you have large media files?
Anyway, you may not have the same problems. It won't hurt to upgrade if you're not already on the SVN version. Let us know who your hosting companies are & how your problem is resolved. This will help others who find themselves in a similar position.
George
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Server memory doesn't seem to be an issue here because I've tested it on direct copy from other server (with errors on new one) and then on a fresh install with only GEDCOM file imported (no media files). The same errors appear.
My first hosting company (no errors) is http://www.hostmonster.com. The second one is http://www.easyisp.com (with errors). I have good experience with EasyISP and they are very helpful in problem solving but first I have to know what to ask them about.
I have got some idea, but I am not sure. My PHP/MySQL knowledge is not so deep. Maybe the problem sits in number of concurrent connections? This idea comes from my observation, that error appears only on MyGedView page where there is many simultaneous "spinning wheels" running (I suppose, they mean waiting for script/database answer). On other pages error does not show up. Even on start page (logged out) in spite simmilar boxex displayed on the right hand side but left side is different. As an effect, there is less "wheels" (less busy) so I suppose there is less parallel database connections and problem does not occur.
Let me know What d you think?
Tom
PS
In my last post I said, that error occurs always on right hand side panels. This prooved not to be true. It does appear on left hand side boxes also but less often.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tom …
First problem easyisp.com is being listed as an available domain, so if they were having problems when you tried …
Each panel does need an open connection to the database, so if your connections are limited, then you will see problems. Not sure that it is easy to 'slow down' things so that you use a smaller number of connections, but enquiring if there is a limit would be the starting point … that is if they are still around ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, but I have to add another dimension to this disscusion.
I have changed PHP version on my new server (EasyISP) from 5.2 to 5.3 and along with it, some parameters changed. So now it shows:
I assume Apache?
Does Apache have limits set? One of the protections from attack is to limit the number of connections that occur in a short time, and this would probably give different errors, so are you still seeing the PDO error in the failing modules?
( Don't use PDO or MySQL myself - so I can't compare anything )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Still, the effect of errors produced while many blocs open at once, tells me to look for reason in growing connections number. My knowledge of PhpGedView script is close to zero so it is hard to tell what is the source of problem.
PS
Is it possible to switch off some blocks showing on MyGedView page?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A very important question: What version of PhpGedView are you running? You should be using version 4.3.0, which is also known as the "SVN" version. Download and install instructions are in a recent Help topic whose title begins with "Repost: Download …" This post is actually quite old, but periodically it gets "bumped" to appear at the top of the Help list.
If you can log in as Admin, you can customize the Welcome page to reduce or eliminate unwanted blocks.
If you can't log in, you can change the contents of the "blocks" directory. Rename the unwanted block scripts to something other than "xxx.php" by changing the ".php" extension. Use a name such as "xxx.foo". Alternatively, just delete the unwanted block scripts altogether. You can always restore them from the PGV install files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If the GEDCOM Welcome block is showing, there's a link to customize the Welcome page in that block. If this block is not showing, you should see a link to customize the Welcome page at the bottom of the page.
I would suggest that you get rid of the On This Day and the Upcoming Events blocks. These blocks eat up a lot of processing time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have reverted to the oryginal copy and as you suggested Gerry removed On This Day and User Favourites from MyGedView.
It helped. Error disappared. I am half-happy because it means, that I am on the edge of available resources and I still do not know what is failing? It is kind of temporary fix.
I understand, that changes I've made to blocks layout affect only my portal? What do I do to propagate it on the whole system as general setting?
I hope, you can address this problem in next releases.
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With such a small GEDCOM, it is unlikely you have exhausted resources. More likely you have a loop or error in your family tree data. Have you run GEDCHECK ?
I have reverted to the oryginal copy
Huh? Do you mean you have NOT upgraded to SVN 4.3? While even this version is rather long-in-the-tooth, it is reasonable stable. Any other version contains significant security holes and XSS problems, as well as serious bugs. I am not saying v4.3 is perfect by any measure, but it is so much better than any other option, you should always be using that version of the project. -Stephen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do not bother with previous question. I've found explanation so it is not serious problem just GEDCOM standard sticking problem. There is no other error.
I'm still trying to find the root of oryginal problem. My error shows (always the same):
Fatal error: Uncaught exception 'PDOException' with message 'No Connection Established'
in /home/atomik/domains/dudarscy.pl/public_html/genealogia/includes/classes/class_pgv_db.php:704
Stack trace:
#0 /home/atomik/domains/dudarscy.pl/public_html/genealogia/includes/functions/functions_db.php(2744): PGV_DB::prepare('SELECT setting_...')
#1 /home/atomik/domains/dudarscy.pl/public_html/genealogia/includes/session.php(533): get_user_setting('1', 'language')
#2 /home/atomik/domains/dudarscy.pl/public_html/genealogia/config.php(75): require_once('/home/atomik/do...')
#3 /home/atomik/domains/dudarscy.pl/public_html/genealogia/index.php(29): require('/home/atomik/do...')
#4 {main} thrown in /home/atomik/domains/dudarscy.pl/public_html/genealogia/includes/classes/class_pgv_db.php on line 704
Look at the line #1.. it looks like simple query "get_user_setting('1', 'language')". In my view, Just one db query without any crossreferences whatsoever.. but it fails exactly on this, always! Isn't it odd? If it was a loop or GEDCOM error, it wouldn't stop on simple user language query. Imagine, different boxex fail randomly having different history behind and still failing on that simple query. Not likely.
Maybe I misinterpret it? What is your opinion?
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tom - I think you will find that is the FIRST query for a page or module load, so it IS still indicating that something is limiting your database access. I think I would still be looking at an ISP 'problem' rather than anything which is wrong in your configuration. I am assuming that the 'ISP' is providing the database? This is the norm with most of this shared hosting, and so it's access to THAT which is restricted.
I run my own database servers so never hit that area …
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are right Lester, that it is database connection problem, but have a look on that. It says 'No Connection Established'. So why is it, that there is a dozen of succesful connections around (obviously because other boxex work) and suddenly one connection fails to establish and it is always the same query comming from the same script line? Isn't it odd? Does it look to you as database problem? Not for me, because if it was, it would fail on random query. On the other hand, asking for user language happens very often. Each box requires it. Why does it not fail anywhere else? The only common thing (visualy) that distinguish "failng" boxes is "spinning wheel" while waiting. Only those boxex are prune to fail. Maybe this observation will help to resolve the problem?
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tom - you still have not answered the question 'where is the database?'
If the ISP is providing MySQL as a service, then 'No Connection Established' would be the message I would expect when you have exceeded your limit on accessing that service …
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ofcourse it is ISP who is providing web and db servers for me. I told before it was www.easyisp.pl.
What limit do you mean I have exceeded? With 100 individuals on GEDCOM file?! and why is it still refusing connection only while asked for user language? Some kind of privacy protection? :P (just kidding). What about 100.000 indviduals in Stephen's GEDCOM (myarnolds.com)? What kind of monster server does he have to accomodate 1000 more data than I have?
'No Connection Established' message could be the message meaning "you are trying to submit a query but your database is not connected (ie because you didn't ask to connect, because of failure, because of unaware disconnection.. anything)"
Failure is unlikely because it happens always in the same line of the script.
Anyway, I've raised a ticket to my ISP asking for help and maybe I will have some news soon.
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tom - There is a difference between shared hosting, and our running our own servers.
On shared hosting, many ISP's charge extra for 'databases' and so you probably have a limit on how many you can use. The software that runs this is a separate service to that providing the website PHP, so none of the limits on your website settings affect it.
Your ISP is the only person who can answer this problem - I think - as they control the number of connections they allow to the database. The error you are seeing is telling you that you can't open any MORE connections to the database. That is why we can't help you other than reducing the number of open connections. It does sound as if easyisp have just restricted access to the database more than your previous ISP and so only they can fix this - if this is indeed the reason - which I am fairly sure now it is.
Just to confirm, you have a connection string for the database which takes you to another 'domain' where the databases are managed by easyisp ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In both cases NO LIMIT There is also no limit on the number and size of databases on my account. I have even deleted 2 spare databases today to check if it was a problem. No change. So.. where is the problem? Do they lie and present fake settings?
Just to confirm, you have a connection string for the database which takes you to another 'domain' where the databases are managed by easyisp ?
Database is local not remote (localhost in settings) if this is what you are asking about.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tom - the problem here is I'm not quite sure exactly WHERE your database is being managed from. MOST ISP's run the database service themselves, so as I have already said, the limits you set IN php are not relevant. Now setting 'localhost' would suggest to me that the MySQL software is running on your machine, but does the 'control panel'; for your web hosting give you a separate section for managing your 'databases' . On the few shared hosting setups that I have plaid with, you get perhaps one database, and you can manage it via the control panel. I can see from the google translation of easyisp that you get 'unlimited' but I would still anticipate that these are 'hosted' in a different area to you web pages …
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have no faintest idea Lester where are databases hosted. One is sure that they are not on my home computer if this is what you mean by "your machine". "localhost" for me means, that it runs on IP 127.0.0.1 which is local address for operating system pointing to itself. So for me, both (PHP and MySQL) run on the same machine and operating system (phisical or virtual.. doesn't mater).
I am given DirectAdmin panel for account/domains administration purposes and among others, there is phpMyAdmin available to manage MySQL databases. Both DirectAdmin and phpMyAdmin run on the same IP which is also my domain IP. Is it enough to believe, that MySQL and PHP run on the same server?
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mostly this happens on the Welcome Page and the Portal, when logged in. When you are anonymous the welcome page seems to work just fine, but shows different 'blocks'. If I reload the page the blocks that load are not consistent.
My only thought is that the different blocks are timing out, I am using free hosting. The PHP time limit is set to 10 even and I can not change that.
Users are confused/concerned about the errors and being family are pretty insistent that I should fix them. I'm still trying to sort out all the settings at this point.
Any suggestions as to what I can do?
Once you log in, privacy calculations apply. Get a new host that actually provides decent service and parameters. You need at least a 30 second script time, maybe more depending on the size and complexity of your gedcom.
-Stephen
Hi Stephen,
I've got similar error which occured after I moved to another server. I'm not sure what time do you mean? Some forums refer to database connection timeout and some to script one.
Anyway.. my server reports
max_execution_time=30
mysql.connect_timeout=30
On previous server it was
max_execution_time=30
mysql.connect_timeout=60
I am very suspicious about those values to be guilty because errors occur instantly after page refreshing so.. there is no 30+ sec timeout , not even 2 sec.
Also configuration check reporting "You may not be able to run all functions on large databases with many individuals.
Your maximum time limit is 30" does not seem to refer to my "large" database because it actually consists of only 108 individuals.
The error occurs ONLY on MyGedView page, ALWAYS on right hand side panels. Page reloads quickly (1-2 sec) almost instantly and errors occur randomly (appr 3 errors on every 4 refreshes)
Any hint?
Lithodora/Tom,
Both server memory and timeout limits may cause errors in PGV. I am surprised that a 108 person site causes problems. 108 is supposed to be a lucky number - another superstition bites the dust. Do you have large media files?
Anyway, you may not have the same problems. It won't hurt to upgrade if you're not already on the SVN version. Let us know who your hosting companies are & how your problem is resolved. This will help others who find themselves in a similar position.
George
Server memory doesn't seem to be an issue here because I've tested it on direct copy from other server (with errors on new one) and then on a fresh install with only GEDCOM file imported (no media files). The same errors appear.
My first hosting company (no errors) is http://www.hostmonster.com. The second one is http://www.easyisp.com (with errors). I have good experience with EasyISP and they are very helpful in problem solving but first I have to know what to ask them about.
I have got some idea, but I am not sure. My PHP/MySQL knowledge is not so deep. Maybe the problem sits in number of concurrent connections? This idea comes from my observation, that error appears only on MyGedView page where there is many simultaneous "spinning wheels" running (I suppose, they mean waiting for script/database answer). On other pages error does not show up. Even on start page (logged out) in spite simmilar boxex displayed on the right hand side but left side is different. As an effect, there is less "wheels" (less busy) so I suppose there is less parallel database connections and problem does not occur.
Let me know What d you think?
Tom
PS
In my last post I said, that error occurs always on right hand side panels. This prooved not to be true. It does appear on left hand side boxes also but less often.
Tom …
First problem easyisp.com is being listed as an available domain, so if they were having problems when you tried …
Each panel does need an open connection to the database, so if your connections are limited, then you will see problems. Not sure that it is easy to 'slow down' things so that you use a smaller number of connections, but enquiring if there is a limit would be the starting point … that is if they are still around ;)
Hi,
Sorry for mistake.. http://www.easyisp.pl ofcourse.
So you think, that I might be right with my suggestion?
My new server (with errors) shows:
mysql.max_links Unlimited
mysql.max_persistent 100
Old one shows:
mysql.max_links Unlimited
mysql.max_persistent Unlimited
Could it be, that 100 persistent connections limit generate that problem? If yes, what can I do about it apart of asking them to increase the number?
Tom
I'm sorry, but I have to add another dimension to this disscusion.
I have changed PHP version on my new server (EasyISP) from 5.2 to 5.3 and along with it, some parameters changed. So now it shows:
max_execution_time=30
mysql.connect_timeout=60
mysql.max_links Unlimited
mysql.max_persistent Unlimited
It is exactly the same as on the old (working) server. So.. all assumptions about the root of problem vanished :(
What can I do?
Tom
I assume Apache?
Does Apache have limits set? One of the protections from attack is to limit the number of connections that occur in a short time, and this would probably give different errors, so are you still seeing the PDO error in the failing modules?
( Don't use PDO or MySQL myself - so I can't compare anything )
What kind of limits are you talking about? Have a look yourself and compare
(error site) http://genealogia.dudarscy.pl/a.php
(good site) http://dudarscy.co.cc/a.php
Still, the effect of errors produced while many blocs open at once, tells me to look for reason in growing connections number. My knowledge of PhpGedView script is close to zero so it is hard to tell what is the source of problem.
PS
Is it possible to switch off some blocks showing on MyGedView page?
A very important question: What version of PhpGedView are you running? You should be using version 4.3.0, which is also known as the "SVN" version. Download and install instructions are in a recent Help topic whose title begins with "Repost: Download …" This post is actually quite old, but periodically it gets "bumped" to appear at the top of the Help list.
If you can log in as Admin, you can customize the Welcome page to reduce or eliminate unwanted blocks.
If you can't log in, you can change the contents of the "blocks" directory. Rename the unwanted block scripts to something other than "xxx.php" by changing the ".php" extension. Use a name such as "xxx.foo". Alternatively, just delete the unwanted block scripts altogether. You can always restore them from the PGV install files.
I am using 4.2.4 version downloaded from here http://wiki.phpgedview.net/en/index.php?title=Download. I will try SVN version tonight.
How do I customize Welcom page as Admin? I cannot find any option.
Tom
If the GEDCOM Welcome block is showing, there's a link to customize the Welcome page in that block. If this block is not showing, you should see a link to customize the Welcome page at the bottom of the page.
I would suggest that you get rid of the On This Day and the Upcoming Events blocks. These blocks eat up a lot of processing time.
Unfortunately, SVN version produces the same error :(
I have reverted to the oryginal copy and as you suggested Gerry removed On This Day and User Favourites from MyGedView.
It helped. Error disappared. I am half-happy because it means, that I am on the edge of available resources and I still do not know what is failing? It is kind of temporary fix.
I understand, that changes I've made to blocks layout affect only my portal? What do I do to propagate it on the whole system as general setting?
I hope, you can address this problem in next releases.
Tom
With such a small GEDCOM, it is unlikely you have exhausted resources. More likely you have a loop or error in your family tree data. Have you run GEDCHECK ?
Huh? Do you mean you have NOT upgraded to SVN 4.3? While even this version is rather long-in-the-tooth, it is reasonable stable. Any other version contains significant security holes and XSS problems, as well as serious bugs. I am not saying v4.3 is perfect by any measure, but it is so much better than any other option, you should always be using that version of the project.
-Stephen
Stephen,
Do not bother with previous question. I've found explanation so it is not serious problem just GEDCOM standard sticking problem. There is no other error.
I'm still trying to find the root of oryginal problem. My error shows (always the same):
Look at the line #1.. it looks like simple query "get_user_setting('1', 'language')". In my view, Just one db query without any crossreferences whatsoever.. but it fails exactly on this, always! Isn't it odd? If it was a loop or GEDCOM error, it wouldn't stop on simple user language query. Imagine, different boxex fail randomly having different history behind and still failing on that simple query. Not likely.
Maybe I misinterpret it? What is your opinion?
Tom
Tom - I think you will find that is the FIRST query for a page or module load, so it IS still indicating that something is limiting your database access. I think I would still be looking at an ISP 'problem' rather than anything which is wrong in your configuration. I am assuming that the 'ISP' is providing the database? This is the norm with most of this shared hosting, and so it's access to THAT which is restricted.
I run my own database servers so never hit that area …
You are right Lester, that it is database connection problem, but have a look on that. It says 'No Connection Established'. So why is it, that there is a dozen of succesful connections around (obviously because other boxex work) and suddenly one connection fails to establish and it is always the same query comming from the same script line? Isn't it odd? Does it look to you as database problem? Not for me, because if it was, it would fail on random query. On the other hand, asking for user language happens very often. Each box requires it. Why does it not fail anywhere else? The only common thing (visualy) that distinguish "failng" boxes is "spinning wheel" while waiting. Only those boxex are prune to fail. Maybe this observation will help to resolve the problem?
Tom
Tom - you still have not answered the question 'where is the database?'
If the ISP is providing MySQL as a service, then 'No Connection Established' would be the message I would expect when you have exceeded your limit on accessing that service …
Ofcourse it is ISP who is providing web and db servers for me. I told before it was www.easyisp.pl.
What limit do you mean I have exceeded? With 100 individuals on GEDCOM file?! and why is it still refusing connection only while asked for user language? Some kind of privacy protection? :P (just kidding). What about 100.000 indviduals in Stephen's GEDCOM (myarnolds.com)? What kind of monster server does he have to accomodate 1000 more data than I have?
'No Connection Established' message could be the message meaning "you are trying to submit a query but your database is not connected (ie because you didn't ask to connect, because of failure, because of unaware disconnection.. anything)"
Failure is unlikely because it happens always in the same line of the script.
Anyway, I've raised a ticket to my ISP asking for help and maybe I will have some news soon.
Tom
Tom - There is a difference between shared hosting, and our running our own servers.
On shared hosting, many ISP's charge extra for 'databases' and so you probably have a limit on how many you can use. The software that runs this is a separate service to that providing the website PHP, so none of the limits on your website settings affect it.
Your ISP is the only person who can answer this problem - I think - as they control the number of connections they allow to the database. The error you are seeing is telling you that you can't open any MORE connections to the database. That is why we can't help you other than reducing the number of open connections. It does sound as if easyisp have just restricted access to the database more than your previous ISP and so only they can fix this - if this is indeed the reason - which I am fairly sure now it is.
Just to confirm, you have a connection string for the database which takes you to another 'domain' where the databases are managed by easyisp ?
Lester,
I admit, it is not easy to say where the problem oryginates. That's why I asked easyisp for help.
What kind of restriction do you mean exactly? You can see here, settings for ma previous ISP http://www.dudarscy.co.cc/a.php and compare them with easyisp settings here http://genealogia.dudarscy.pl/a.php. You can see clearly, that:
mysql.max_links=Unlimited
mysql.max_persistent=Unlimited
In both cases NO LIMIT There is also no limit on the number and size of databases on my account. I have even deleted 2 spare databases today to check if it was a problem. No change. So.. where is the problem? Do they lie and present fake settings?
Database is local not remote (localhost in settings) if this is what you are asking about.
Tom - the problem here is I'm not quite sure exactly WHERE your database is being managed from. MOST ISP's run the database service themselves, so as I have already said, the limits you set IN php are not relevant. Now setting 'localhost' would suggest to me that the MySQL software is running on your machine, but does the 'control panel'; for your web hosting give you a separate section for managing your 'databases' . On the few shared hosting setups that I have plaid with, you get perhaps one database, and you can manage it via the control panel. I can see from the google translation of easyisp that you get 'unlimited' but I would still anticipate that these are 'hosted' in a different area to you web pages …
I have no faintest idea Lester where are databases hosted. One is sure that they are not on my home computer if this is what you mean by "your machine". "localhost" for me means, that it runs on IP 127.0.0.1 which is local address for operating system pointing to itself. So for me, both (PHP and MySQL) run on the same machine and operating system (phisical or virtual.. doesn't mater).
I am given DirectAdmin panel for account/domains administration purposes and among others, there is phpMyAdmin available to manage MySQL databases. Both DirectAdmin and phpMyAdmin run on the same IP which is also my domain IP. Is it enough to believe, that MySQL and PHP run on the same server?
Tom