Alex-WisdomSeeker has asked for the wisdom of the Perl Monks concerning the following question:
There are some more connections in the same script looking for a cart and an whitelist name. So I have some questions : Will the problem solve itself after some time or will the open process run until reset and try to get infos from the locked DB ? Is it possible to do a small query to check for max user connections on the DB to exit if it is to high ? Any other idea to get protection from DOS attacks or bot swarms (thought about rectriciting Asian IPs in htaccess or using HTTP::BrowserDetect) ? Thanks for you time any maybe Help !$db=DBI->connect('dbi:mysql:******'); $query = $db->prepare("SELECT * FROM `Tablename` WHERE 1 AND `artnr` + = '$link' ORDER BY id DESC LIMIT 0 , 25;"); $query->execute(); while (my @row = $query->fetchrow_array()){ (datas like name etc,*,*) = @row; print "Shoppage" } $query->finish; $db->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Optimize DBI connect to avoid max_user_connections
by InfiniteSilence (Curate) on May 29, 2014 at 14:29 UTC | |
|
Re: Optimize DBI connect to avoid max_user_connections
by marto (Cardinal) on May 29, 2014 at 14:32 UTC | |
|
Re: Optimize DBI connect to avoid max_user_connections
by Anonymous Monk on May 29, 2014 at 14:33 UTC | |
by Alex-WisdomSeeker (Initiate) on May 29, 2014 at 19:21 UTC | |
by fishmonger (Chaplain) on May 29, 2014 at 19:52 UTC | |
by Alex-WisdomSeeker (Initiate) on May 29, 2014 at 21:29 UTC | |
by fishmonger (Chaplain) on May 29, 2014 at 21:53 UTC |