# Is it possible to increase the VPN server startup/restart timeout?

**URL:** <https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750>\
**Category:** Pritunl\
**Created:** [December 9, 2024, 8:10am UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750 "2024-12-09T08:10:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoodPekar](https://forum.pritunl.com/user_avatar/forum.pritunl.com/woodpekar/32/1083_2.png) [@WoodPekar](https://forum.pritunl.com/u/WoodPekar)\
**Post date:** [December 9, 2024, 8:10am UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/1 "2024-12-09T08:10:09Z")

</div>

Hello!  
I have to add a very large number of subnets to the server routes.

For example, AWS has over 8 thousand subnets of IP addresses. I combined them as much as possible, it turned out to be about 600, but this is still too much for Pritunl.

I increased all the options in mongo, which contain the word timeout, which are in settings/vpn.py ([pritunl/pritunl/settings/vpn.py at master · pritunl/pritunl · GitHub](https://github.com/pritunl/pritunl/blob/master/pritunl/settings/vpn.py#L6-L61)), and the server really does not crash, but there is an Error  
“Failed to start the server, server error occurred.” But the server is still Online and continues to do Push route. In reality, there is a Warning  
“Stopping duplicate instance, check date time sync” and Push route starts over.

Is there a setting that will increase the OpenVPN server start time and will not force the server to restart?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 9, 2024, 12:01pm UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/2 "2024-12-09T12:01:25Z")

</div>

Run `sudo pritunl set vpn.lib_iptables true` to use lib iptables which will add iptables rules faster. Run `sudo pritunl set vpn.startup_timeout 600` to increase the server startup timeout. Additionally the _Restrict Routing_ option can be disabled to reduce the number of rules needed.

This may be an issue with the server performance. I have a test server with 950 NAT routes that will start without lib iptables and without an increased timeout.

For AWS public ranges, AWS publishes a list of subnet ranges. There is a script in repository at [**pritunl/tools/add\_aws\_ranges.py**](https://github.com/pritunl/pritunl/blob/master/tools/add_aws_ranges.py) to use the API to add all these ranges.

---

<div class="post-metadata">

**Author:** ![WoodPekar](https://forum.pritunl.com/user_avatar/forum.pritunl.com/woodpekar/32/1083_2.png) [@WoodPekar](https://forum.pritunl.com/u/WoodPekar)\
**Post date:** [December 9, 2024, 3:16pm UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/3 "2024-12-09T15:16:40Z")

</div>

Thanks for your reply!  
Unfortunately this didn’t help…  
I did as you said, but no  
Of course, I have 1500 routes registered  
I thought maybe if I made the VM more powerful it would help, but that’s not the case either.  
It’s stupid that startup\_timeout is 600 seconds, but after 60 seconds the server starts to restart. In this case, the server status remains Online.

Yes, I used the link from this script to get a list of AWS subnets

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 9, 2024, 4:37pm UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/4 "2024-12-09T16:37:24Z")

</div>

Run `sudo pritunl set vpn.server_ping_ttl 120`.

---

<div class="post-metadata">

**Author:** ![WoodPekar](https://forum.pritunl.com/user_avatar/forum.pritunl.com/woodpekar/32/1083_2.png) [@WoodPekar](https://forum.pritunl.com/u/WoodPekar)\
**Post date:** [December 10, 2024, 12:01pm UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/5 "2024-12-10T12:01:53Z")

</div>

> [@zach](#):
>
> pritunl set vpn.server\_ping\_ttl 120

It works!  
Thank you and long life!

Or maybe you also know what setting affects the message in the UI “Failed to start the server, server error occurred.”?

 ![image](https://forum-static.pritunl.com/original/2X/3/3eb5b2ad975ca3e4ac3baf60dc836c069952ae63.png)

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 10, 2024, 12:04pm UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/6 "2024-12-10T12:04:02Z")

</div>

The full error message would be shown in the top right logs.

---

<div class="post-metadata">

**Author:** ![WoodPekar](https://forum.pritunl.com/user_avatar/forum.pritunl.com/woodpekar/32/1083_2.png) [@WoodPekar](https://forum.pritunl.com/u/WoodPekar)\
**Post date:** [February 3, 2025, 9:55am UTC](https://forum.pritunl.com/t/is-it-possible-to-increase-the-vpn-server-startup-restart-timeout/2750/7 "2025-02-03T09:55:43Z")

</div>

For anyone who encountered this and doesn’t understand what’s going on, try disabling the output of debug logs in the server settings.  
If you disable it, the server starts almost instantly, despite the number of routes.
