BEC crashing server after couple restarts

Quarterbreed

Well-Known Member
Have any idea what it would be, or would it be related to my schudler im at work atm on my phone but can login from my phone.. Any ideas?
 
The arma2OA server exe does crash sometimes on shutdown. Some people integrate a line into their startup batch so that once it closes another line will actually kill the process. you could use something like

Code:
taskkill /im arma2oaserver.exe

If you have more than one server running on the same machine then it gets a bit more complicated.

PS glad you managed to get your BEC working :)
 
Thx to you i got it working :) will this fix the crash.. And if it does can i send you the code so you can put it in for me.. I would mess it up
 
It doesnt prevent the crash but it kills the process so it doesn't really matter anymore. .

All you need to do is add the line to end of your server startup batch. It's pretty easy
 
Ok thx, so when it crashes the server will still run

Actually what I told you was a bit wrong.

My guess is that the program is crashing when it is told to shut down. This is what I have seen from time to time. What you should do is just make a separate batch file and have it called from your scheduler just like the startup batch.
 
this is what my scheduler looks like..

<?xml version="1.0"?>
<Scheduler>

<job id="0">
<time>23:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="1">
<time>23:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="2">
<time>23:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="3">
<time>23:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="4">
<time>23:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="5">
<time>00:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>1</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="6">
<time>03:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="7">
<time>03:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="8">
<time>03:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="9">
<time>03:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="10">
<time>03:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="11">
<time>04:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="12">
<time>07:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="13">
<time>07:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="14">
<time>07:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="15">
<time>07:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="16">
<time>07:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="17">
<time>08:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>1</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="18">
<time>11:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="19">
<time>11:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="20">
<time>11:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="21">
<time>11:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="22">
<time>11:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="23">
<time>12:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>1</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="24">
<time>15:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="25">
<time>15:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="26">
<time>15:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="27">
<time>15:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="28">
<time>15:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="29">
<time>16:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>1</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="30">
<time>19:30</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="31">
<time>19:45</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="32">
<time>19:50</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="33">
<time>19:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="34">
<time>19:59</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>

<job id="34">
<time>20:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>1</loop>
<cmd>#restart</cmd>
<cmdtype>0</cmdtype>
</job>

</Scheduler>
 
Your scheduler is different from what I use. You'd have to do it differently since you use an actual restart command and I use a shutdown command.
 
i jsut copied this one from some tutorial :/ so it would restart every 4 hours.. would your scheduler work if i copied it
 
you could try this for your scheduler

Code:
<?xml version="1.0"?>
<Scheduler>
 
<job id="0">
<time>043000</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 30 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="1">
<time>044500</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="2">
<time>045000</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 10 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="3">
<time>045500</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="4">
<time>045900</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 Server will be rebooted in 1 minute</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="5">
<time>050000</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
 
<job id="6">
<time>050000</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>c:\start-server.bat</cmd> 
<cmdtype>1</cmdtype>
</job>
 
</Scheduler>

Then just add these three lines to the beginning of your startup batch

Code:
timeout /t 15
taskkill /im arma2oaserver.exe
timeout /t 15
 
ok ill add that scheduler and then add that code at the bottom of my start up ill let ya know how it goes, how often does that make it reset
 
ok ill add that scheduler and then add that code at the bottom of my start up ill let ya know how it goes, how often does that make it reset


Add the task kill thing to the beginning of your startup, not the end.

I set that to reboot every 5 hours. If you want to adjust it just change the "<time>043000</time>" sections. The format is just HHMMSS so 043000 is 4 hours and 30 minutes after the server starts.
 
timeout /t 15
taskkill /im arma2oaserver.exe
timeout /t 15
didnt work for my start up i put on the top said it didnt reconize that command
 
do i put it be fore the echo..
this is what it looks like


timeout /t 15
taskkill /im arma2oaserver.exe
timeout /t 15
@echo off
echo Starting MySQL database. Please wait 5-10 seconds.
start /MIN /D.\MySQL\ MySQL.bat
ping 127.0.0.1 -n 15 >NUL
.\MySQL\cecho {0A} OK.{07}
echo.
echo.
echo.
echo Executing spawn script...
.\MySQL\bin\mysql --user=root --password=root --host=127.0.0.1 --port=3316 --database=hivemind --execute="call pMain()"
ping 127.0.0.1 -n 5 >NUL
.\MySQL\cecho {0A} OK.{07}
echo.
echo.
echo Starting BEC
start C:\ServerTools\dayzbec.bat
echo.
echo Starting server...
start .\Expansion\beta\arma2oaserver.exe -mod=@dayz;@hive -name=cfgdayz -config=cfgdayz\server.cfg -cfg=cfgdayz\arma2.cfg -profiles=cfgdayz -world=Chernarus -exThreads=0 -maxMem=2024
.\MySQL\cecho {0A} OK.{07}
echo.
echo.
echo.
echo.
echo.
echo.
.\MySQL\cecho {0B}Launcher created by Pwnoz0r.{07}
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo.
.\MySQL\cecho {0A}Leaving le launcher...{07}
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo.
echo.
exit
 
try moving it down one line like this. You can add the message to tell you what it is doing too. "echo Killing previous Arma Server Instances"

@echo off
echo Killing previous Arma Server Instances

timeout /t 15
taskkill /im arma2oaserver.exe
timeout /t 15
echo Starting MySQL database. Please wait 5-10 seconds.
 
Back
Top