Jump to content

Apache2 and virtualhosts and win - Anyone having problems???


pjames

Recommended Posts

I am experiencing some strange problems with a php/Mysql/Apache2/win2000 site and am thinking it may have something to do with the vitrual hosting on apache2. The site is run on the same pc as only one other domain, so 2 domains for the pc. One is an all php site and the other is all html. The php site will just hang after a while and not really sure why but starting to narrow it down, hopefully. Apache will not log any errors and I have the error reporting set the highest I could. It is running the mpm-wnnt. The html site is running great, so have not really thought it to be an Apache problem, but just recently thinking that it may be in the virtual hosting.

 

The thread for my problems is here:

http://forums.phpfreaks.com/viewtopic.php?t=1853

 

Any help or suggestions would be helpful.

 

Thanks,

Paul

Link to comment
Share on other sites

hello again...

 

i\'m not sure if it could be virtual hosting - i run 3 sites on a small linux box without issue.

 

- is apache set to create logs? are these getting big?

- do you have any settings on that may bog apache down, such as hostnamelookups, usecanonicalname, extendedstatus?

- is keepalive on?

- if you are not using .htaccess files make sure allowoverride none is in your default directory directive

- are you using the rewrite engine?

- is php ran as a module or cgi?

- at the time the server starts to hang, how many apache child processes are active?

 

:shock:

Link to comment
Share on other sites

Thanks for the reply again....

 

Had a busy day yesterday and couldn\'t write back.

 

1) - Yes apache is set to log, the access logs are seperate for the sites that are hosted and the site in question had a log of 17mb!, I turned off the access log and kept the error log going, don\'t need acces logs at this point.

 

2) - do you have any settings on that may bog apache down, such as hostnamelookups, usecanonicalname, extendedstatus?

++ No none of those variables are set, never set them.

 

3) - keepalive is on - but just noticed when looking at the keepalive settings something i never noticed:

BrowserMatch \"Mozilla/2\" nokeepalive

BrowserMatch \"MSIE4.0b2;\" nokeepalive downgrade-1.0 force-response-1.0

I have no idea what these directives are but looks to me that if they are using explorer or netscape then the keepalive is off?

 

4) no rewrite engine.

 

5) php is ran as a module

 

6) not sure how to check the child processes on win2000, i have looked at the mem usage and at times it shows 3 apaches there, one really gobbling mem, but not all that bad, only 30 to 50 megs, well i don\'t know exactly what is bad.

 

Still tugging away at the problem and effigy thanks a ton for your insight, your couple of posts have taught me a lot. Hopefully I will get this figured before i go through the hassle of porting to postgre.

 

Thanks again,

Paul

Link to comment
Share on other sites

what is under this directive in your httpd.conf?

 

<IfModule mpm_winnt.c>

?

</IfModule>

 

this is a very important area... it controls how much apache can handle. i do not know much about the windows MPM\'s but i suggest looking it and its directives up and experimenting.

 

the keep alive stuff is ok. those are always default... i guess the browsers do have the capability.

 

-----------

 

your mysql variables look fairly similar to mine and i have had not problems ( on linux ) ... how many tables are you using? how big are they? are they indexed with a primary key?

Link to comment
Share on other sites

The following is in the <ifmodule:

 

<IfModule mpm_winnt.c>

ThreadsPerChild 1024

MaxRequestsPerChild 0

</IfModule>

 

I did some research a week ago on the apache site regarding this directive and notice that there isn\'t much under this mpm as the others, but unsure as to whether the other directives would or could work under win2000, or what exactly they do.

 

The largest table is this:

tbl_customer_notes

Data 545,444 Bytes

Index 80,896 Bytes

Total 626,340 Bytes

Format dynamic

Rows 4,132

Row length ø 132

Row size ø 152 Bytes

Next Autoindex 4,142

 

The next largest is half that size. There are 55 tables in the database. All the tables are indexed off of the id, only 3 have an index elsewhere. an example of the structure:

tbl_employee

tbl_employee_address

tbl_employee_changes

tbl_employee_group

tbl_employee_internet

tbl_employee_notes

tbl_employee_phone

tbl_employee_spouse

tbl_employee_time

tbl_employee_vacation

tbl_employee_wage

 

The \"sub\" tables are small and once i have an id, i usually select what i need from the other tables. The only \"sub\" table that i do full text search on, Other than a name field is the tbl_customer_address, where a customer is needed to be located for an address. I thought this design would be a better structure, mainly to get in, get a name and id and close that table down, then with the id, get into another table grab the stuff and then close that table, also it seems any more there are so many one-to-many relationships built on just the constant name. Not sure if that is great thinking or not.

 

Thanks again for your insight.

 

Paul

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.