hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP/MySQL problems
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

PHP/MySQL problems

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-10-2002, 03:22 PM
wildeep wildeep is offline
New Member
 
Join Date: Jun 2002
Posts: 1

PHP/MySQL problems


I run a free invisible counter service (http://angrybeancounter.com/). But, I have a problem.

The script is powered by a MySQL database. The main counter script is called every time someone visits a site with the counter on, and since this happens a lot, many MySQL connections can be opened at once, which have led to the script using a lot of CPU power, and my host temporarily suspending my account.

At the moment, it is set to check the server load before connecting to the MySQL server, and if it is above a certain level, then it will just die. This is so it won't eat up all available CPU power. This unfortunately also means that many hits get 'lost'.

The evil script is here. Is there anything anyone can think of that would make it go faster (especially as far as MySQL connections are concerned)?

I thought about writing all the hits to a data file then updating the main database via a cron'd script every so often, but that means I can't access the user's settings.

Thanks for any help.

Reply With Quote


Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
Five Things You Didn’t Know about the European Cloudscape, with Daniel Beazer Web Hosting News 2011-10-25 18:50:41
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?