logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache using 70-100% CPU usage at times
Author
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Thu 16 Oct '08 3:13    Post subject: Apache using 70-100% CPU usage at times Reply with quote

Hey,
I had posted here before, however now I'm back on a 32-bit os with apache.

My server setup is as so:
- Windows 2003 Server Standard Edition
- 2 GB RAM
- 10Mbit port
- Apache 2.2
- MySQL Server
- PHP (installed as a module) 5.2.6 (latest)
- Using cronolog to split the error logs by day (dd/mm/yy)

I'm still having issues with being able to handle around 1,000 visitors.

What am I doing wrong really? I don't get it. All I have right now is a forum, vBulletin forum. When we hit around 1,000 visitors httpd.exe goes nuts. The site takes a while to load.

I really need some advise here.

Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Oct '08 9:12    Post subject: Reply with quote

You could use mod_fcgid for PHP. Than the PHP handling is separated from apache.
See http://www.apachelounge.com/viewtopic.php?t=2729 for the fcgid setup.
Back to top
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Thu 16 Oct '08 17:37    Post subject: Reply with quote

Hey,
Thanks, I'm trying out the configuration. I have got it running on my test server, however on the live server, apparently there is some issue with the module loading.

I had to move PHP out of /Program Files/ and into C:/PHP/, I'm guessing its reading the Environment Variable for the PHP path, which requires me to restart the server; Since, when I enabled php with fcgi, my forum died, Database Error.

Thanks,
I'll post back any changes, improvements or anything with this setup once I get it on the live server
Back to top
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Thu 16 Oct '08 22:14    Post subject: Reply with quote

Does anyone have any other tips on how to reduce load?
Back to top
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Thu 16 Oct '08 23:41    Post subject: Reply with quote

hey,
Okay I setup fcgi mod with apche, however my mysql is now messed up. I get this error:

Quote:

Warning: mysql_connect() [function.mysql-connect]: Can't create TCP/IP socket (10106) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mysql.php on line 3
Could not connect: Can't create TCP/IP socket (10106)


Sorry, did not search, problem is solved:
http://www.sitebuddy.com/php/php_apache_fast_cgi_install [SOLUTION]


Problems with mod_fcgi and php_mssql.dll extension
For some odd reason, with php_mssql enabled with mod_fcgi I cannot make remote connections with mssql, and for local connections I have to use the server name (i.e. MYSERVER1). Any idea why or how to fix this?

Right now I'm loading PHP as a module for that one directory that uses MSSQL, while for my forum i'm using MOD_FCGI. However I'd prefer a method where I only use mod_fcgi.
Back to top
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Fri 17 Oct '08 20:58    Post subject: Reply with quote

Okay I solved it.

I needed an update ntwdblib.dll

http://rapidshare.com/files/154980898/ntwdblib.dll.html

Put it in you're
/PHP/
/WINDOWS/System32/

Folders, and don't know why this might be needed, but
/Apache/Bin/
Back to top


Reply to topic   Topic: Apache using 70-100% CPU usage at times View previous topic :: View next topic
Post new topic   Forum Index -> Apache