[eduVPN-deploy] stats.json file not updated
François Kooman
fkooman at tuxed.net
Fri May 8 11:29:00 CEST 2020
On 5/8/20 11:19 AM, Marc Langer via eduVPN-deploy wrote:
> Hi,
Hi Marc,
> Since this change, the file is not updated anymore. Which process writes
> this file, and which permissions are necessary?
On my server, without ever changing anything (manually):
# pwd
/var/lib/vpn-server-api
# ls -l stats.json
-rw-------. 1 apache apache 1835 May 8 00:02 stats.json
It is updates from cron:
$ sudo cat /etc/cron.d/vpn-server-api
RANDOM_DELAY=10
@hourly apache /usr/bin/vpn-server-api-housekeeping
@hourly apache /usr/bin/vpn-server-api-disconnect-expired-certificates
@daily apache /usr/bin/vpn-server-api-stats
The cron is run as the user "apache". If you manually want to update the
"stats" file, you can use:
$ sudo -u apache /usr/bin/vpn-server-api-stats
There is one other reason why the stats won't update: PHP runs out of
memory. If you have many users, it can be there is not enough memory
available to run the stats script... You see that when you manually run
the above command, it will error out.
You can update
memory_limit = 128M
in /etc/php.ini to e.g. 512M
(Yes I know, this stats script is really stupid and really shouldn't use
this much memory...).
Regards,
François
More information about the eduVPN-deploy
mailing list