| | |
I had a experience of a website coded in PHP
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2004
Posts: 25
Reputation:
Solved Threads: 0
Hi all
I had a experience of a website coded in PHP. that was a student result database site. specially used for publishing national certications exam in my country. the results are used to publish at a fixed date that was pre-defined. So the site got a lot of access request from clinets or searchers. in this situation the site fails to fetch the result for individual requests. why did this happens? that is why i have rised that question!
1. was this occur for low bandwidth of the lines?
2. was this happened for database server limitations??
3. may web server included for this problem?
thanks indetail.
I had a experience of a website coded in PHP. that was a student result database site. specially used for publishing national certications exam in my country. the results are used to publish at a fixed date that was pre-defined. So the site got a lot of access request from clinets or searchers. in this situation the site fails to fetch the result for individual requests. why did this happens? that is why i have rised that question!
1. was this occur for low bandwidth of the lines?
2. was this happened for database server limitations??
3. may web server included for this problem?
thanks indetail.
Some PHP sites allow only a certain number of concurrent connections (mysql) before it won't render the php on the page anymore. You are also correct... webserver limitations come into play.
My Home Away from Home: Yet Another Linux Blog
•
•
Join Date: Oct 2004
Posts: 14
Reputation:
Solved Threads: 1
Hello billah_norm,
1. What is the genre of message. Timeout error, errors of connection acces inside the result of the web page, ... ?
2. Where are from the error ?
Client => transport => apache => PHP => MySQL
a. If the error is a connection timeout
- the number of apache server
- low bandwith
- server orverload (?)
etc
b. If the error is on the php result that mean a problem to connect the database
see you,
fpepito
1. What is the genre of message. Timeout error, errors of connection acces inside the result of the web page, ... ?
2. Where are from the error ?
Client => transport => apache => PHP => MySQL
a. If the error is a connection timeout
- the number of apache server
- low bandwith
- server orverload (?)
etc
b. If the error is on the php result that mean a problem to connect the database
see you,
fpepito
•
•
Join Date: Sep 2004
Posts: 25
Reputation:
Solved Threads: 0
Thanks fpepito,
i am not sure of this. because I have no authority or not administrator on this site i mentioned.
But i Think this kind of error came from the unexpected threads that exit the thread limitaion. Most probably I know that threads are controlled by web servers. That is a web server accepts how many numbers of threads for a script simultaneuosly. If the script like as follow:
[PHP]<?php
//database conectivity codes here
$query=select * from table_name; //fetch statement
mysql_exec($query);
?>[/PHP]
then what may occur??
1. first of all web browser sends request to web server. in response web server will grant for that request and make an execution for that script.
a. If only one request in a given time, the script will fetch the informations
and sends it to the browser via web server.
b. If there multi request occur at a given time,
multi thread will considered by the web server. In this situation two
things may occur:
i. How many threads will be accepted by the web server
simultenuously? it should be considered....
ii. If the multithreads are accepted simultenously then comes the
questions for the SQL server connectivity.
c. Furthermore it will be considered for the bandwidth time limits as time
errors or others related with this.
My questions were for the case of 1(b):
aa. How many threads are defined to be accepted by the web server? or
is it even possible to define the number of threading acceptance?
bb. How many connectivity may define by the SQL server? Is it possible
to define this connectivity or not?
cc. Is it fair to consider PHP Scripts for these concepts? If it is then
How?
Thanks you again and thanks to TKS
See you all
i am not sure of this. because I have no authority or not administrator on this site i mentioned.
But i Think this kind of error came from the unexpected threads that exit the thread limitaion. Most probably I know that threads are controlled by web servers. That is a web server accepts how many numbers of threads for a script simultaneuosly. If the script like as follow:
[PHP]<?php
//database conectivity codes here
$query=select * from table_name; //fetch statement
mysql_exec($query);
?>[/PHP]
then what may occur??
1. first of all web browser sends request to web server. in response web server will grant for that request and make an execution for that script.
a. If only one request in a given time, the script will fetch the informations
and sends it to the browser via web server.
b. If there multi request occur at a given time,
multi thread will considered by the web server. In this situation two
things may occur:
i. How many threads will be accepted by the web server
simultenuously? it should be considered....
ii. If the multithreads are accepted simultenously then comes the
questions for the SQL server connectivity.
c. Furthermore it will be considered for the bandwidth time limits as time
errors or others related with this.
My questions were for the case of 1(b):
aa. How many threads are defined to be accepted by the web server? or
is it even possible to define the number of threading acceptance?
bb. How many connectivity may define by the SQL server? Is it possible
to define this connectivity or not?
cc. Is it fair to consider PHP Scripts for these concepts? If it is then
How?
Thanks you again and thanks to TKS
See you all
•
•
Join Date: Oct 2004
Posts: 14
Reputation:
Solved Threads: 1
Hi billah_norm,
I have try a brutal test: a maximum of connection in my own computer (linux / apache / PHP / MySQL) with a minimum of timeout (because I am in local) 1 second.
When a send 5000 requests (of two follows scripts)
I obtain 2 type of result file:
1. *** result is correct
2. *** with problem in MySQL Connection
The result with errors are all like this:
<br />
<b>Warning</b>: Too many connections in <b>/home/httpd/html/PHP/connect.php</b> on line <b>22</b><br />
<br />
<b>Warning</b>: MySQL Connection Failed: Too many connections
in <b>/home/httpd/html/PHP/connect.php</b> on line <b>22</b><br />
Unable to connect to SQL server
3. *** with problem in Server Connection
--22:47:59-- http://127.0.0.1/php/test5.php
=> `test635.txt'
Connexion vers 127.0.0.1:80...connecté.
requête HTTP transmise, en attente de la réponse...
ERREUR de lecture (Connexion terminée par expiration du délai d'attente) de l'en-tête.
Abandon.
If your problem is MySQL Connection you while the client while received messages like this "Too many connections".
If your problem is with Server Connections you have error from wget/browser, and nothing on the body of file.
I will continue with tests ... perhaps I will find more
see you,
fpepito
########## test5.php
<?
include "/home/httpd/html/PHP/connect.php";
connect_mysql();
$q = "SELECT * FROM fotos_file";
$query = mysql_query ($q);
$res = mysql_num_rows($query);
echo "found $res";
?>
########## test5.sh
#!/bin/bash
rm -f test*.txt test*.log
echo "url: "
read url
echo "nb connection:"
read nb
for i in $(seq 1 $nb) ; do
wget $url -T 1 -O test$i.txt -o test$i.log &
done
I have try a brutal test: a maximum of connection in my own computer (linux / apache / PHP / MySQL) with a minimum of timeout (because I am in local) 1 second.
When a send 5000 requests (of two follows scripts)
I obtain 2 type of result file:
1. *** result is correct
2. *** with problem in MySQL Connection
The result with errors are all like this:
<br />
<b>Warning</b>: Too many connections in <b>/home/httpd/html/PHP/connect.php</b> on line <b>22</b><br />
<br />
<b>Warning</b>: MySQL Connection Failed: Too many connections
in <b>/home/httpd/html/PHP/connect.php</b> on line <b>22</b><br />
Unable to connect to SQL server
3. *** with problem in Server Connection
--22:47:59-- http://127.0.0.1/php/test5.php
=> `test635.txt'
Connexion vers 127.0.0.1:80...connecté.
requête HTTP transmise, en attente de la réponse...
ERREUR de lecture (Connexion terminée par expiration du délai d'attente) de l'en-tête.
Abandon.
If your problem is MySQL Connection you while the client while received messages like this "Too many connections".
If your problem is with Server Connections you have error from wget/browser, and nothing on the body of file.
I will continue with tests ... perhaps I will find more

see you,
fpepito
########## test5.php
<?
include "/home/httpd/html/PHP/connect.php";
connect_mysql();
$q = "SELECT * FROM fotos_file";
$query = mysql_query ($q);
$res = mysql_num_rows($query);
echo "found $res";
?>
########## test5.sh
#!/bin/bash
rm -f test*.txt test*.log
echo "url: "
read url
echo "nb connection:"
read nb
for i in $(seq 1 $nb) ; do
wget $url -T 1 -O test$i.txt -o test$i.log &
done
•
•
Join Date: Sep 2004
Posts: 25
Reputation:
Solved Threads: 0
Hi fpepito!
thanks a lot!! your informations maked me found a way of going.
1. Why you found correct results in first type while errors occur for the same for second type?
2. Is there any limitation for MySQL Maximum connectivity?
3. I am not sure of your third error message. HTTP server how related with this MySQL connectivity? So far I know HTTP server acts for introducing the midleware language PHP.
WebBrowser <<==>> Apache <<==>> Midlware(PHP,ASP,Perl) <<==>> Database(MySQL)
I will try to test it. and then inform you.
I will eagerly witing for your further test results
thanks again.
see ya
thanks a lot!! your informations maked me found a way of going.
1. Why you found correct results in first type while errors occur for the same for second type?
2. Is there any limitation for MySQL Maximum connectivity?
3. I am not sure of your third error message. HTTP server how related with this MySQL connectivity? So far I know HTTP server acts for introducing the midleware language PHP.
WebBrowser <<==>> Apache <<==>> Midlware(PHP,ASP,Perl) <<==>> Database(MySQL)
I will try to test it. and then inform you.
I will eagerly witing for your further test results
thanks again.
see ya
![]() |
Similar Threads
- website designed using PHP is case sensitive (Site Layout and Usability)
- How many clients can access a PHP script at a time? (PHP)
Other Threads in the PHP Forum
- Previous Thread: Editing/Creating PHP Fields - Novice! Help?
- Next Thread: Advanced mySQL Querys
| Thread Tools | Search this Thread |
301 access apache api array beginner binary broken button cakephp checkbox class clean cms code countingeverycharactersfromastring crack cron curl database date decode directory display dissertation dropdown dynamic echo email error fairness file files folder form forms function functions google href htaccess html httppost image include insert integration ip javascript joomla limit link login mail match md5 menu methods mlm multiple mysql newsletters oop pageing pagerank paypal pdf php protocol query radio random recursion remote script search secure server sessions simple sms soap source space spam sql syntax system table tutorial update upload url validator variable video virus votedown web youtube





