Author Topic: Apache-php software memory problem?  (Read 2507 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Apache-php software memory problem?
« on: November 08, 2004, 07:39:21 am »
Hi:

I've installed:
apache-1.3.27-php-4.2.3_0.1_arm.ipk
mysql_3.23.49-8.7_arm.ipk
phpwiki-1.3.7.tar.gz

to enable me to run phpWiki on the Zaurus.

Configured it and it runs, however there seems to be some problem with memory.

It starts fine and so, but after I go through a couple of pages in phpWiki, maybe edit one or two, everything on the Z slows down to a grind and eventually I have to reboot.

This even with a 64 MB CF swapping file enabled.

Is there some problem with MySQL or apache taking up more and more memory?

How can I analyze what's going on and solve it?

Thank you.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

netog

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://
Apache-php software memory problem?
« Reply #1 on: November 08, 2004, 09:15:04 am »
Hi:

MySQL+Apache/PHP+Opera is very memory consuming.
I had the same problem, but I could work using a 8MB swap in my SD card. At least I can use some php apps in my zaurus without hanging.
My MSQL storage files are also in my SD card.
I guess your problem is how heavy your php code is, I mean if it has a lot of instructions to execute.

Good luck

Neto G.

pmf

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Apache-php software memory problem?
« Reply #2 on: November 08, 2004, 12:17:16 pm »
Quote
MySQL+Apache/PHP+Opera is very memory consuming.
Apache is very memory conservative. It is most likely a misconfigured MySQL-daemon that is problematic. Try adjusting (i.e. lowering) the values /etc/my.cnf or wherever your my.cnf is located.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Apache-php software memory problem?
« Reply #3 on: November 08, 2004, 03:49:26 pm »
It is probably this, since when I run it, I look at running processes there's three MySQL processes, each taking about 20 megs of memory, ridiculous.

Can you tell me how to edit the my.cnf down to a minimal memory-intensive configuration.

Can't look now, the Zaurus is rebooting again because the MySQL hung the computer again, but I went into the cnf file, which was there just out-of-the-box and there were two values set at 16M, which I changed to 1M. Doesn't seem to have helped things though.

What can I do?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Apache-php software memory problem?
« Reply #4 on: November 08, 2004, 04:00:09 pm »
Hmmm, what I've found. I opened the process watcher window and now - everytime I browse to another page in the phpwiki a new MySQL process is opened, each one takes 7.6 Megs now. However the old ones don't get terminated.

So now after browsing a couple of pages, I have 10 8 meg MySQL processes in memory, now wonder it brings the Z down everytime.

It shows their status as S, which I assume is Sleeping.

But shouldn't they just be terminated.

Is this somehow affected by the settings in the cnf files.

How do I configure so that they're terminated after the page is displayed?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

LadyBug

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • http://
Apache-php software memory problem?
« Reply #5 on: November 10, 2004, 09:23:59 am »
I have not encountered your specific issues since I use flat file db for the Wiki, not mysql. However, it is known that phpWiki has issues with memory consumption.

Anyway, just yesterday Reini Urban, the main phpWiki developer, posted a message to the phpWiki mailing list saying that he has done some major rework in the WikiDB and streamlined the process a lot.  Quotes from his mail: "This improves the mysql backend a lot. There's no locking anymore on simple browse, and reduces the numnber of queries from typically 25 to 15 per page view." and "All tests run through and there's no memory problem anymore, but I have to recheck on more platforms and php version."
C760, Symbol CF WiFi, Lexar 1GB SD, score of CFs
Currently running pdaXrom.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Apache-php software memory problem?
« Reply #6 on: November 10, 2004, 12:12:28 pm »
Quote
I have not encountered your specific issues since I use flat file db for the Wiki, not mysql.
Can I use a flat file database for phpWiki on the Zaurus? Maybe this would simplify stuff...
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze