Hi folks, I recognized in some cases many many php processes like this:
/usr/local/bin/php -f /etc/rc.filter_configure_sync
I have a pfsense cluster here, which sync configs (not states).
In some cases it happens that all memory and swap is consumed by this
processes, one run has a duration between 15 seconds and some minutes.
I saw that there is a lock in place, which waits for other php
processes trying the same until they finish.
I changed the behaviour with the following extension:
####################### snip #################
--- filter.inc.old 2012-10-16 11:48:44.000000000 +0200
+++ filter.inc 2012-10-16 11:36:13.000000000 +0200
@@ -188,7 +188,11 @@
global $time_based_rules, $filterdns, $aliases;
/* Use filter lock to not allow concurrent filter reloads
during this run. */
- $filterlck = lock('filter', LOCK_EX);
+ $filterlck = lock('filter', LOCK_EX | LOCK_NB);
+ if (!$filterlck) {
+ die("couldn't get lock\n");
+ }
+
filter_pflog_start();
update_filter_reload_status("Initializing");
################ snap ########################
The other way would be to make a real queue for doing things instead of
starting hundreds processes in parallel and waiting to get a lock.
What do you think of the change?
Regards
Oli
signature.asc
Description: PGP signature
_______________________________________________ List mailing list [email protected] http://lists.pfsense.org/mailman/listinfo/list
