![]() |
|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
Hi all,
I am having a bit of trouble with apache and php 5 (Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8e DAV/2 SVN/1.4.6 PHP/5.2.6). I have SVN running over apache and I can commit and update changes without any issue. I have mercurial setup over apache and can sync with remote repositories no problem. I can run Code:
<?php phpinfo(); ?> I am pretty sure I have enough free space... Code:
#df -i Filesystem 512-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/wd0a 78544440 6075320 68541900 8% 188037 4696441 3% / kernfs 2 2 0 100% 896 128 87% /kern Code:
#top load averages: 9.77, 8.53, 5.52 up 0 days, 1:01 20:22:43 48 processes: 5 runnable, 42 sleeping, 1 on processor CPU states: 0.0% user, 0.0% nice, 99.4% system, 0.6% interrupt, 0.0% idle Memory: 150M Act, 73M Inact, 384K Wired, 5204K Exec, 11M File, 20K Free Swap: 129M Total, 129M Used, 8K Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 10 root -18 0 0K 16M pgdaemon 11:10 99.02% 99.02% [pagedaemon] 817 www 28 0 50M 12M RUN 0:01 0.00% 0.00% httpd 172 www -5 0 50M 11M biowait 0:01 0.00% 0.00% httpd 170 www -5 0 50M 8816K biowait 0:01 0.00% 0.00% httpd 12 root -18 0 0K 16M aiodoned 0:01 0.00% 0.00% [aiodoned] 15679 root 28 0 188K 404K CPU 0:00 0.00% 0.00% top 796 www 28 0 50M 14M RUN 0:00 0.00% 0.00% httpd 17953 www 28 0 50M 6532K RUN 0:00 0.00% 0.00% httpd 28765 root 28 0 24K 128K RUN 0:00 0.00% 0.00% atrun 222 root 28 0 180K 80K RUN 0:00 0.00% 0.00% syslogd 11 root 18 0 0K 16M syncer 0:00 0.00% 0.00% [ioflush] 792 root 18 0 228K 4K pause 0:00 0.00% 0.00% <csh> 787 troy.wil 18 0 228K 4K pause 0:00 0.00% 0.00% <csh> 9 root 14 0 0K 16M crypto_w 0:00 0.00% 0.00% [cryptoret] 6 root 10 0 0K 16M usbtsk 0:00 0.00% 0.00% [usbtask-hc] 5 root 10 0 0K 16M usbevt 0:00 0.00% 0.00% [usb0] 8 root 10 0 0K 16M usbevt 0:00 0.00% 0.00% [usb1] 7 root 10 0 0K 16M usbtsk 0:00 0.00% 0.00% [usbtask-dr] 755 root 10 0 248K 4K nanoslee 0:00 0.00% 0.00% <cron> 3700 root 10 0 144K 4K wait 0:00 0.00% 0.00% <sh> 1 root 10 0 100K 4K wait 0:00 0.00% 0.00% <init> 103 root 3 0 56K 4K ttyin 0:00 0.00% 0.00% <getty> 105 root 3 0 56K 4K ttyin 0:00 0.00% 0.00% <getty> |
|
|||
![]()
pagedaemon is a kernel task, you can't kill it.. I honestly don't know why it's consuming so much processor time though.
Very odd indeed.. |
|
|||
![]()
Disk space doesn't appear to be the problem.
Quote:
|
|
|||
![]() Quote:
Solution: Buy more RAM - it is cheap, and forget using swap as memory. |
|
|||
![]()
Yes, the question was rhetorical, but it was time for the OP to come back with more information.
Given that swap has been exhausted, 42 processes are sleeping, the CPU is being chewed up in system clerical stuff, load averages are going through the roof, it appears to be classic OS thrashing. Given all the httpd instances, it will be interesting to hear whether the OP is doing Web server virtualization stuff or merely getting pounded by outside requests. |
|
|||
![]()
Hi all, thanks for the replies.
The system is a p4 1.4GHz with 128mb or ram. Everything was working OK till I upgraded from 3.1 to 4.0 (I did a full install after trying an upgrade with no luck). In the full install I copied the configuration files over for apache (httpd.conf) from the old version. The odd thing is there should be no load on this server at all except for me as this is a test box that I use before doing anything with my production box (even my production box is only used by a small team of developers, 5 people at most). In addition I used to have a very similar setup on an ancient amdk6-2 400mhz system with 64mb of ram without any problems. Here is the result of top when I don't access the dokuwiki site located on the server. It looks as though swap isn't being used. Code:
load averages: 0.00, 0.00, 0.00 up 0 days, 11:41 08:07:46 39 processes: 38 sleeping, 1 on processor CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Memory: 28M Act, 568K Wired, 8220K Exec, 10M File, 156M Free Swap: 129M Total, 129M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 11 root 18 0 0K 16M syncer 0:03 0.00% 0.00% [ioflush] 1635 root 28 0 184K 1064K CPU 0:00 0.00% 0.00% top 2961 troy.wil 18 0 228K 992K pause 0:00 0.00% 0.00% csh 3026 root 18 0 228K 984K pause 0:00 0.00% 0.00% csh 9 root 14 0 0K 16M crypto_w 0:00 0.00% 0.00% [cryptoret] 5 root 10 0 0K 16M usbevt 0:00 0.00% 0.00% [usb0] 6 root 10 0 0K 16M usbtsk 0:00 0.00% 0.00% [usbtask-hc] 7 root 10 0 0K 16M usbtsk 0:00 0.00% 0.00% [usbtask-dr] 8 root 10 0 0K 16M usbevt 0:00 0.00% 0.00% [usb1] 1 root 10 0 100K 852K wait 0:00 0.00% 0.00% init 755 root 10 0 248K 812K nanoslee 0:00 0.00% 0.00% cron 105 root 3 0 56K 828K ttyin 0:00 0.00% 0.00% getty 104 root 3 0 56K 828K ttyin 0:00 0.00% 0.00% getty 103 root 3 0 56K 828K ttyin 0:00 0.00% 0.00% getty 102 root 3 0 56K 828K ttyin 0:00 0.00% 0.00% getty 100 root 2 0 5080K 6540K select 0:00 0.00% 0.00% httpd 2402 root 2 0 408K 3232K netio 0:00 0.00% 0.00% sshd 109 www 2 0 5120K 2768K kqread 0:00 0.00% 0.00% httpd 3058 troy.wil 2 0 408K 2448K select 0:00 0.00% 0.00% sshd 415 root 2 0 296K 1452K select 0:00 0.00% 0.00% sshd 151 root 2 0 640K 1124K select 0:00 0.00% 0.00% dhclient 699 postfix 2 0 276K 1096K kqread 0:00 0.00% 0.00% qmgr 3027 postfix 2 0 216K 1056K kqread 0:00 0.00% 0.00% pickup 629 root 2 0 196K 992K kqread 0:00 0.00% 0.00% master 222 root 2 0 188K 864K kqread 0:00 0.00% 0.00% syslogd 758 root 2 0 72K 848K kqread 0:00 0.00% 0.00% inetd 107 www -4 0 5272K 6268K semwait 0:00 0.00% 0.00% httpd 108 www -4 0 5260K 5780K semwait 0:00 0.00% 0.00% httpd 106 www -4 0 5384K 4744K semwait 0:00 0.00% 0.00% httpd 878 www -4 0 5120K 2768K semwait 0:00 0.00% 0.00% httpd 783 www -4 0 5120K 2768K semwait 0:00 0.00% 0.00% httpd 80 www -4 0 5120K 2768K semwait 0:00 0.00% 0.00% httpd 4 root -6 0 0K 16M atath 0:00 0.00% 0.00% [atabus1] 48 root -6 0 0K 16M physiod 0:00 0.00% 0.00% [physiod] 3 root -6 0 0K 16M atath 0:00 0.00% 0.00% [atabus0] 0 root -18 0 0K 16M schedule 0:00 0.00% 0.00% [swapper] 12 root -18 0 0K 16M aiodoned 0:00 0.00% 0.00% [aiodoned] 2 root -18 0 0K 16M smtaskq 0:00 0.00% 0.00% [sysmon] 10 root -18 0 0K 16M pgdaemon 0:00 0.00% 0.00% [pagedaemon] The only thing that I can think of is that there is something wrong with my apache installation or php5. I had php5 and apache installed on NetBSD v3.1 and I copied over the configuration files so there shouldn't be any configuration differences. Any pointers on things that I could try or look for? Is it safe to use the old configuration files (particularly from v3.1) in v4.0? |
|
|||
![]()
Well, what is dokuwiki doing in that environment and does the same bahaviour happen on older NetBSD when running dokuwiki?
|
|
|||
![]()
Well,
Dokuwiki is a simple (at least I think it is) wiki that relies on flat files (so no db dependencies). I have no clue what it is doing - am not a php programmer. I load the url in my browser (on another machine) and point it to the dokuwiki installation (brand new fresh install) and the front page loads, very slowly and then freezes before it is complete. It did work correctly in NetBSD v3.0 and v3.1. I can't recall off the top of my head what the exact version numbers for apache2 and php5 were, but they would have been the latest from pkgsrc. Any ideas on tracing the problems from the server itself? |
|
|||
![]()
I downloaded an older version that I was using on my older server and installed it. It causes pagedaemon to go nuts and hog the cpu.
|
|
|||
![]()
After searching for information on dokuwiki, I see that it isn't in pkgsrc. So, where did you get it?
Likewise, it appears that you asked this on the dokuwiki forum a month ago: http://forum.dokuwiki.org/thread/2172 Did you get any kind of response then? |
|
|||
![]() Quote:
http://www.splitbrain.org/projects/dokuwiki First download I tried, the latest version: dokuwiki-2008-05-05.tgz I was running this one on my old system: dokuwiki-rc2008-04-11.tgz Installation is as simple as extracting the tgz to a directory that is accessible from apache (well at least that is what I have done in the past). I put it under htdocs/dokuwiki - setting the owner and group to www. Then using a browser navigate to that folder "dokuwiki/install.php" fill out the installation portion and the wiki should be setup. I have tried both of those versions (fresh installs to different directories) and still the same issue. I'll try other older versions once I get home and see if that helps. At first I thought it may be my data from the older wiki was somehow corrupted. But later tests with the 'fresh' copies confirmed the same behaviour. Quote:
At this point I am not sure where the problem lies - the php script dokuwiki or the apache configuration or php5. Is there anyway to trace.debug the php scripts to see what is happening? Cheers and thanks for the replies, Troy |
|
|||
![]() Quote:
Applications found in the wild might be POSIX compliant (which is a good thing...), but more than likely they are Linux-centric, & the chances of them simply running on any of the *BSD's as they originally existed is slim. Even though you are dealing with a Web application which is abstracted away from the OS more than other types of applications, there are fundamentally two general issues when porting anything:
To be successful at porting, you need to understand the application at a deep level. Having seen the symptoms that you have presented, it would be a reasonable bet to guess that something is amiss in PHP-land which may be due to the reasons outlined above, or there may be a multithreaded race condition which appears on NetBSD which wasn't present in whatever OS dokuwiki was originally developed (again, more likely Linux...). You can continue to ask in various forums (& contacting the maintainer of NetBSD's PHP maintainer would be a good person to befriend...), but I suspect you will not be talking to the right people who have both the depth & particular knowledge you need. It should now be apparent that porting can range from trivial to very complex. At this point, I would guess that porting dokuwiki is somewhere in the middle of this continuum. As for how to resolve this set of problems, you have three choices:
|
|
|||
![]() Quote:
Oh well, thanks anyway. I appreciate the informative response. Cheers, Troy |
|
|||
![]()
I thought I'd report back to close this thread off. There was a problem with NetBSD. When I upgraded from v3.1 to 4.0. I choose to reformat the partition after not having any luck with the upgrade process. Apparently it didn't format the partitions and just put files.
After completely wiping the drive and then verifying the installation was correct everything seems to be working will. Cheers, Troy |
|
|||
![]()
Glad it worked out for you.
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forum usage: How to thank? | Greg_Morgan | Off-Topic | 2 | 9th October 2009 12:49 AM |
dd and split usage problem | paul-lkw | FreeBSD General | 4 | 31st January 2009 08:13 PM |
memory usage monitoring using net-snmp | ducu_00 | FreeBSD Ports and Packages | 2 | 11th October 2008 03:12 PM |
Script to mail me resources usage? | bigb89 | Programming | 5 | 20th July 2008 06:58 AM |
FreeBSD and bandwidth usage per subnett/IP | espenfjo | FreeBSD General | 2 | 4th July 2008 08:05 AM |