Openvpn service start failed

I write openvpn config which download from my provider, in configuration with service.openvpn.server. I try to run systemctl start openvpn_myvpn.service and it is always failed with Start request repeated too quickly by journalctl.

I have tried to run openvpn --config myvpn_config, it is successful.

How can I solve this problem?

EDIT:

I have set autoStart to false.

What does the log tell you?

● openvpn-expressvpn_jp.service - OpenVPN instance ‘expressvpn_jp’
Loaded: loaded (/nix/store/yc237jc0mp34s01wwyzjdrd0qmll44lw-unit-openvpn-expressvpn_jp.service/openvpn-expressvpn_jp.service; linked; vendor preset>
Active: failed (Result: exit-code) since Tue 2019-09-10 16:03:27 CST; 6s ago
Process: 25077 ExecStart=openvpn --suppress-timestamps --config /nix/store/spbdl9vbp8kvk0hdzqzf3pb7i6amp753-openvpn-config-expressvpn_jp (code=exite>
Main PID: 25077 (code=exited, status=1/FAILURE)
Status: “Pre-connection initialization successful”

Sep 10 16:03:27 nixos systemd[1]: openvpn-expressvpn_jp.service: Service RestartSec=100ms expired, scheduling restart.
Sep 10 16:03:27 nixos systemd[1]: openvpn-expressvpn_jp.service: Scheduled restart job, restart counter is at 5.
Sep 10 16:03:27 nixos systemd[1]: Stopped OpenVPN instance ‘expressvpn_jp’.
Sep 10 16:03:27 nixos systemd[1]: openvpn-expressvpn_jp.service: Start request repeated too quickly.
Sep 10 16:03:27 nixos systemd[1]: openvpn-expressvpn_jp.service: Failed with result ‘exit-code’.
Sep 10 16:03:27 nixos systemd[1]: Failed to start OpenVPN instance ‘expressvpn_jp’.

I think you want openvpn@myvpn

I have fixed it.
The repeated request can be solved by config systemd.extraConfig with DefaultStartLimitIntervalSec and DefaultStartLimitBurst.

But it is not the realy problem. The main reason is my vpn config which contains space before each line(because of nix multiple-line-string doesn’t remove space beginning from each line).