Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Multiple httpd & php processes

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 928 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cirkit
      last edited by

      I have a Pfsense 2.1 with 2Ghz Intel Dual core, 2GB ram handling 80-100 computers with squid 3.3.10 v2.2.6 and qlproxy and sarg
      I observe my memory usage rising every day.
      It starts from 28% on fresh boot and increases by 20% every day, until the 5th day it reaches 93% and squid and qlproxy crash with " icap protocol error" I am posting my top output at a point when memory usage is reported at 76% and at this point there is no traffic and no computers online.
      why does the memory usage not come down when there is no traffic of computers using the firewall?
      why are there multiple httpd and php processes using high RAM?

      top screen shot attached

      Pfsense_high_memory_usage_multiple_php_httpd_processes.jpg
      Pfsense_high_memory_usage_multiple_php_httpd_processes.jpg_thumb

      1 Reply Last reply Reply Quote 0
      • M
        MindfulCoyote
        last edited by

        Hmm… your question seems vaguely familiar.  ;)

        Be sure that you have logging enabled to help you find this problem: Services: Proxy server: General settings: Logging Settings: Enabled logging

        Other than the ICAP errors, what are you seeing that leads you to suspect the memory? Are there memory related errors in Status: System logs: General?  (i.e. out of swap space, memory exhausted, unable to create, etc.) Is squid reporting any errors in it's logs? (in Services: Proxy server: Realtime) FreeBSD normally handles it's memory utilization quite well, so if we aren't seeing actual memory errors anywhere I would suspect some other issue.

        I've seen reports this issue can be related to file descriptors. Just curious, what is the output of this command?
        squidclient mgr:info | grep descriptor

        @cirkit:

        why does the memory usage not come down when there is no traffic of computers using the firewall?
        why are there multiple httpd and php processes using high RAM?

        Regarding the memory utilization, Squid's job is to cache so it's going to cache as much as possible within the limits you specify in it's configuration. It's not unusual to see it using memory and disk space to do it's caching.

        The php processes look normal to me. pfSense is written in php so it's not surprising to see it running.

        The httpd processes are unusual.  If you've provided a complete list of installed packages then I'd guess they must be related to qlproxy?

        Err

        –
        Erreu Gedmon

        Firewalls are hard...
        but the book makes it easier: https://portal.pfsense.org/book/

        1 Reply Last reply Reply Quote 0
        • C
          cirkit
          last edited by

          Thanks for the reply,

          it seems I am on the trail to pinpoint the reason for "icap protocol error".
          looking at the dashboard I realised that there was NO SWAP, I manually enabled SWAP by issuing "swapon"
          But after a reboot again no SWAP, I once again had to start in manually, now it is SIX days the memory utilisation hovers between 83% to 90% and swap between 6% to 13%…also my manually turning ON SWAP shows only 2048mb SWAP on 2048mb Ram, normally on other systems I have noticed double the swap memory..Now two queries

          1. How do I ensure SWAP turns ON on every reboot
          2. How do I change size of swap from 2048mb to 4096mb

          My hDD is 80Gb, 74Gb reported by Pfsense
          The first partition is 70Gb, so I believe I have 4096mb for swap.

          1 Reply Last reply Reply Quote 0
          • M
            MindfulCoyote
            last edited by

            @cirkit:

            1. How do I ensure SWAP turns ON on every reboot
            2. How do I change size of swap from 2048mb to 4096mb

            Make swap permanent by adding it to /etc/fstab. Something like:
            #/dev/label/swap0              none            swap    sw              0      0

            Ref. https://www.freebsd.org/doc/handbook/adding-swap-space.html

            To increase the size of the swap you will need to repartition the disk or create a "swap file" (see link above) and add it to fstab as above.

            https://forum.pfsense.org/index.php?topic=78519.msg429186#msg429186

            Err

            –
            Erreu Gedmon

            Firewalls are hard...
            but the book makes it easier: https://portal.pfsense.org/book/

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.