Squid out of swap space nanobsd
-
hello I'm having squid troubles on nanobsd hardware. Squid process gets killed after a while with pid 76681 (squid), uid 62, was killed: out of swap space
it's a nanobsd with 256Mb memory and a 4Gb Cfcard build in.
Squid 3.1.20 pkg 2.0.6
2.1-BETA1 (i386)
built on Wed Mar 13 19:28:04 EDT 2013
FreeBSD 8.3-RELEASE-p6CPU usage
22%
Memory usage
82%
Disk usage
15%Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/ufs/pfsense0 3780028 506778 2970848 15% /
devfs 2 2 0 100% /dev
/dev/ufs/cf 99068 1352 89792 1% /cf
/dev/md0 78812 1220 71288 2% /tmp
/dev/md1 118492 48432 60584 44% /var
devfs 2 2 0 100% /var/dhcpd/dev<squidcache><config><cache_replacement_policy>lru</cache_replacement_policy>
<cache_swap_low><cache_swap_high><donotcache><enable_offline><ext_cachemanager><harddisk_cache_size>10600</harddisk_cache_size>
<harddisk_cache_system>null</harddisk_cache_system>
<level1_subdirs>4</level1_subdirs>
<harddisk_cache_location>/var/squid/cache</harddisk_cache_location>
<minimum_object_size>0</minimum_object_size>
<maximum_object_size>1024</maximum_object_size>
<memory_cache_size>10</memory_cache_size>
<maximum_objsize_in_mem>64</maximum_objsize_in_mem>
<memory_replacement_policy>lru</memory_replacement_policy>
<cache_dynamic_content><refresh_patterns></refresh_patterns></cache_dynamic_content></ext_cachemanager></enable_offline></donotcache></cache_swap_high></cache_swap_low></config>also dealing with pid 42008 (squid), uid 62 inumber 21 on /var: filesystem full
How to change the default log to the Cfcard?
memory usage (proxy 14.9%):
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 10 23.0 0.0 0 8 ?? RL 14Mar13 30832:43.70 [idle]
root 11 16.9 0.0 0 104 ?? WL 14Mar13 3342:11.67 [intr]
root 59161 2.0 5.8 32624 14100 ?? S 5:54PM 0:01.56 /usr/local/bin/php
root 40074 1.0 6.0 33648 14544 ?? S 14Mar13 0:29.71 /usr/local/bin/php
root 0 0.0 0.0 0 56 ?? DLs 14Mar13 0:07.49 [kernel]
root 1 0.0 0.0 1888 88 ?? ILs 14Mar13 0:03.27 /sbin/init –
root 2 0.0 0.0 0 8 ?? DL 14Mar13 0:03.76 [g_event]
root 3 0.0 0.0 0 8 ?? DL 14Mar13 0:32.56 [g_up]
root 4 0.0 0.0 0 8 ?? DL 14Mar13 1:45.52 [g_down]
root 5 0.0 0.0 0 8 ?? DL 14Mar13 0:00.00 [crypto]
root 6 0.0 0.0 0 8 ?? DL 14Mar13 0:00.00 [crypto returns]
root 7 0.0 0.0 0 8 ?? DL 14Mar13 1:24.50 [pfpurge]
root 8 0.0 0.0 0 8 ?? DL 14Mar13 0:00.00 [xpt_thrd]
root 9 0.0 0.0 0 8 ?? DL 14Mar13 0:08.66 [pagedaemon]
root 12 0.0 0.0 0 8 ?? DL 14Mar13 1:04.12 [ng_queue]
root 13 0.0 0.0 0 8 ?? DL 14Mar13 440:08.88 [yarrow]
root 14 0.0 0.0 0 64 ?? DL 14Mar13 0:43.17 [usb]
root 15 0.0 0.0 0 8 ?? DL 14Mar13 0:00.09 [vmdaemon]
root 16 0.0 0.0 0 8 ?? DL 14Mar13 0:05.51 [idlepoll]
root 17 0.0 0.0 0 8 ?? DL 14Mar13 0:00.06 [pagezero]
root 18 0.0 0.0 0 8 ?? DL 14Mar13 0:19.29 [bufdaemon]
root 19 0.0 0.0 0 8 ?? DL 14Mar13 0:21.39 [vnlru]
root 20 0.0 0.0 0 8 ?? DL 14Mar13 4:14.79 [syncer]
root 21 0.0 0.0 0 8 ?? DL 14Mar13 0:19.73 [softdepflush]
root 48 0.0 0.0 0 8 ?? DL 14Mar13 1:43.91 [md0]
root 53 0.0 0.0 0 8 ?? DL 14Mar13 1:48.67 [md1]
root 308 0.0 0.3 3416 684 ?? INs 14Mar13 13:28.82 /usr/local/sbin/check_reload_status
root 313 0.0 0.0 3416 0 ?? IWN - 0:00.00 check_reload_status: Monitoring daemon of check_reload_status
root 327 0.0 0.2 3936 372 ?? Is 14Mar13 0:00.06 /sbin/devd
root 1596 0.0 1.2 6952 2900 ?? SN Tue02PM 1:36.80 /usr/sbin/tcpdump -s 256 -v -S -l -n -e -ttt -i pflog0
root 1910 0.0 0.3 3328 828 ?? SN Tue02PM 2:25.06 logger -t pf -p local0.info
root 7185 0.0 0.4 3544 1016 ?? Is 18Mar13 0:00.05 /usr/local/sbin/sshlockout_pf 15
root 12281 0.0 0.6 5344 1412 ?? Is 14Mar13 0:00.02 /usr/sbin/sshd
root 12565 0.0 0.4 3544 916 ?? Is 14Mar13 0:00.05 /usr/local/sbin/sshlockout_pf 15
root 14570 0.0 0.4 3388 1060 ?? Is 14Mar13 0:00.16 dhclient: vr2 [priv] (dhclient)
root 18794 0.0 0.5 3328 1172 ?? SNs 14Mar13 14:08.57 /usr/local/sbin/apinger -c /var/etc/apinger.conf
root 19195 0.0 0.5 4604 1156 ?? IN 14Mar13 0:24.92 rrdtool -
_dhcp 21776 0.0 0.5 3388 1172 ?? Is 14Mar13 20:24.28 dhclient: vr2 (dhclient)
root 24106 0.0 0.5 3448 1184 ?? Is 14Mar13 0:00.18 /usr/sbin/inetd -wW -R 0 -a 127.0.0.1 /var/etc/inetd.conf
root 24557 0.0 1.3 8096 3144 ?? Is 1:13PM 0:05.90 sshd: admin@pts/0 (sshd)
root 29414 0.0 0.8 4988 1832 ?? Ss Tue02PM 7:43.41 /usr/sbin/syslogd -s -c -c -l /var/dhcpd/var/run/log -f /var/etc/syslog.conf
root 30027 0.0 0.2 3708 580 ?? IN 14Mar13 12:37.82 /bin/sh /var/db/rrd/updaterrd.sh
root 31440 0.0 1.2 7024 2812 ?? S 14Mar13 1:33.98 /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf
root 31749 0.0 0.0 31600 0 ?? IWs - 0:00.00 /usr/local/bin/php
root 32125 0.0 0.5 3468 1280 ?? R 5:55PM 0:00.01 ps xauww
root 32705 0.0 0.1 31600 356 ?? Is 14Mar13 0:00.39 /usr/local/bin/php
root 35971 0.0 0.4 3544 1016 ?? Is Tue01PM 0:00.03 /usr/local/sbin/sshlockout_pf 15
root 39409 0.0 0.7 5860 1732 ?? Ss Tue02PM 0:16.77 /usr/pbi/postfix-i386/libexec/postfix/master
postfix 39888 0.0 0.6 5860 1548 ?? I Tue02PM 0:00.98 qmgr -l -t fifo -u
root 55822 0.0 0.5 3420 1292 ?? Is 14Mar13 0:29.42 /usr/sbin/cron -s
root 59932 0.0 0.0 3328 0 ?? IWs - 0:00.00 /usr/local/bin/minicron 240 /var/run/ping_hosts.pid /usr/local/bin/ping_hosts.sh
root 60180 0.0 0.1 3328 248 ?? I 14Mar13 0:04.51 minicron: helper /usr/local/bin/ping_hosts.sh (minicron)
root 60200 0.0 0.0 3328 0 ?? IWs - 0:00.00 /usr/local/bin/minicron 3600 /var/run/expire_accounts.pid /etc/rc.expireaccounts
root 60605 0.0 0.1 3328 248 ?? I 14Mar13 0:00.31 minicron: helper /etc/rc.expireaccounts (minicron)
root 60749 0.0 0.0 3328 0 ?? IWs - 0:00.00 /usr/local/bin/minicron 86400 /var/run/update_alias_url_data.pid /etc/rc.update_alias_url_data
root 60845 0.0 0.1 3328 244 ?? I 14Mar13 0:00.01 minicron: helper /etc/rc.update_alias_url_data (minicron)
root 62389 0.0 2.2 9552 5188 ?? Is 1:14PM 0:00.01 /usr/pbi/squid-i386/sbin/squid -f /usr/pbi/squid-i386/etc/squid/squid.conf
root 62446 0.0 0.4 3544 1016 ?? Is 20Mar13 0:00.04 /usr/local/sbin/sshlockout_pf 15
proxy 62713 0.0 14.9 42320 35860 ?? S 1:14PM 5:18.90 (squid) -f /usr/pbi/squid-i386/etc/squid/squid.conf (squid)
proxy 62783 0.0 0.6 2700 1364 ?? I 1:14PM 0:00.04 (unlinkd) (unlinkd)
root 65492 0.0 0.4 3544 1016 ?? Is 27Mar13 0:00.04 /usr/local/sbin/sshlockout_pf 15
root 68104 0.0 0.4 3544 980 ?? Is 14Mar13 0:00.05 /usr/local/sbin/sshlockout_pf 15
root 80179 0.0 1.1 8092 2588 ?? Is 19Mar13 0:04.61 /usr/local/sbin/mpd4 -b -d /var/etc/pptp-vpn -p /var/run/pptp-vpn.pid -s pptps pptps
root 89254 0.0 0.5 3544 1116 ?? Is Wed09AM 0:00.03 /usr/local/sbin/sshlockout_pf 15
root 90350 0.0 0.4 3544 1016 ?? Is 21Mar13 0:00.04 /usr/local/sbin/sshlockout_pf 15
root 91734 0.0 0.3 1576 784 ?? IN 5:54PM 0:00.00 sleep 60
nobody 93666 0.0 0.7 5576 1796 ?? S Tue02PM 2:31.70 /usr/local/sbin/dnsmasq –local-ttl 1 --all-servers --rebind-localhost-ok --stop-dns-rebind --dns-forward-max=5000 --cache-size=10000
root 99145 0.0 2.6 6352 6372 ?? Ss Tue02PM 19:46.08 /usr/local/bin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
root 67906 0.0 0.0 3784 0 u0 IWs - 0:00.00 login [pam] (login)
root 68381 0.0 0.0 3708 0 u0 IW - 0:00.00 -sh (sh)
root 69923 0.0 0.4 3708 956 u0 I+ 14Mar13 0:00.01 /bin/sh /etc/rc.initial
root 24961 0.0 0.5 3708 1288 0 Is 1:13PM 0:00.03 /bin/sh /etc/rc.initial
root 28746 0.0 0.9 4760 2260 0 I+ 1:14PM 0:00.06 /bin/tcsh</squidcache> -
You're running it out of RAM and filling up the RAM disk also.
Squid on NanoBSD cannot do logging. There isn't enough room to log to the RAM disk (/var or /tmp) and the CF is read only most of the time and thus not suitable for logging.
If you need to have a full-featured squid platform, you'll need to be running a full install on a hard drive or SSD.