To schedule a reboot
-
A reboot only masks the issue, It would be better to solve it
-
I've done it, several times. I've set up a crontab from an ssh shell:
30 06 * * * /sbin/shutdown -r now
to reboot the firewall at 6:30 each morning. It seems to stick just fine until it's physically removed, and I've used it on several v2 versions, though I can't say specifically that I've done it on 2.0.x -
I have to have pfSense reboot every 15 days to return performance back to normal. From what I have deduced this unsolved issue is the cause:
https://redmine.pfsense.org/issues/4821
This is a great use of Cron job for rebooting.
-
Use case for reboot:
When making higher risk changes (usually on Cisco), one schedules a reboot for 15 minutes time. If you screw your changes and loose access, the reboot returns it to known good state. If they're successful, cancel the reboot.
pfSense (over many versions) gets a bit wobbly after assigning or de-assigning interfaces, especially WAN or interface carrying default gateway. I don't know why, I don't have enough foo to figure it out. A reboot always clears it. pfSense can also be a bit naughty adding or deleting routes. If a route to the same place may have come from two different sources, it doesn't track which source, so deletes the route anyway, even if the route belonged to the other source (eg vpn vs static route)
Tonight I added a new interface for an open vpn endpoint to a remote instance, to use as a gateway, and after apply, boom, vpn went down and didn't come back. Scheduled reboot would have been useful, not that I remembered to set one anyway.
ps pfSense is awesome, use it on all my sites.
-
@johnpoz -- how about a memory leak in 23.01 on my SG-1100. Is that a good enough reason to schedule a nightly reboot until they release a fix?
Roy...
-
@rpsmith said in To schedule a reboot:
how about a memory leak in 23.01 on my SG-1100.
And what redmine is that exactly?
-
@johnpoz -- Memory leak might not be the correct terminology.
https://forum.netgate.com/topic/178023/1100-upgrade-22-05-23-01-high-mem-usage/13?_=1676880006434&loggedin=true
Roy...
-
@rpsmith said in To schedule a reboot:
https://forum.netgate.com/topic/178023/1100-upgrade-22-05-23-01-high-mem-usage/13?_=1676880006434&loggedin=true
I have no idea what is going on with that thread to be honest.. I have only been on 23.01 for a day.. But I looked at mine and do see a bump in memory at 3am ish
A quick look at cron jobs do show a few things that kick off at 3am it seems.. But like I said only been running 23.01 for a day, so this is the first 24 hour period.. I will look to see what happens at 3am coming up.
But from what I am seeing I sure wouldn't schedule any sort of reboot schedule - that is insane.. And what does it solve - sure doesn't tell you what is causing it, etc.
-
@johnpoz I posted in https://forum.netgate.com/topic/177886/23-1-using-more-ram/41. Based on my second day it should not increase tonight.
-
@steveits yeah thanks - I saw tiny little change this morning
Just something to keep an eye for a few days.. Still not seeing anything that would justify any sort of reboot schedule that is for sure.
-
I know this is old, but some people do have reasons. I know I have an issue where DNS just stops resolving? but it takes between 2-4 months to actually act up.
Quick reboot and everything is up and running. I have not had time to diag what the issue is, and honestly when it happens my production environment goes down (My Computer Store). And I guarantee it only happens when I'm not here as it always does. I have to contact someone to pull the plug and give her a boot. That's not convenient. Is it a "me" problem, yup... But like many others, kind of shocked it's not already there. I'm not sure anyone's software is that perfect.
I'm not a programmer, but I know it's not that hard to pull off. What ransom would be asked to have a button run a cron job ?
For the now part, it would be great to reboot once a month, hell every 2. Is it a Band-aid? Yup, but would be a great one until I get the time to figure what's going on.
Just My2Cents.... And you get no change.
-
You can just add a cronjob to reboot if you need to.
-
Install cron package.
this is weekly, adjust for you:
minute hour mday month wday who command 1 4 * * 7 root /sbin/shutdown -r now
-
I would use:
/etc/rc.reboot
there. It reboots more cleanly, stops pkgs backs-up ram disks etc. -
And a simple solution without asking 10 questions in return and being told your doing things wrong.
Thanks !