What to do when your local mx server doesnt shut down?

1
Hello all,   I was wondering how you guys deal with your local MX server, when it doesn't want to shut down. Since I am using MX 9.12.4 my server seems to have more problems with shutting down, mostly after some inactivity (e.g. my laptop going in to sleep mode). I know that killing java works sometimes and obviously restarting your whole laptop works. Do you guys have other tips & tricks for this? Either for preventing that the server gets stuck or for killing the server.   Thanks!
asked
3 answers
5

Hi Lars,

 

You can also kill the process via the Command prompt. Run the command prompt as an administrator

First you need to check what the PID (Process Identifier) is of you process to kill and you can do this by following command.

netstat -ano | findstr : port number   → nestat -ano | findstr :8080 (port number that you have specified in the Studio Pro under settings→ Configurations

This will give you a list of Processes running on port 8080 (see example below)

After this command you know your PID check where the IP address contains your port number → this is your local server running 

You can kill this with the following command:

taskkill /PID typeyourPIDhere /F  → taskkill /PID 21888 /F

 

I hope this helps you a bit with shutting down your local servers.

answered
0

I also have this issue since probably one of the Mx 9.x versions, I logged a ticket for this, but Mendix support is not able to reproduce the issue, so it can't be fixed. 

 

Something changed, but don't know if everybody experiences this issue, or just happens for some?

It can be external, for that I would need to test e.g. Mx 8 again and see if it also happens there. Did you test this by any chance Lars?

answered
0

Create a BAT file, named KillPort8090.bat

Past the content blow. En when you want to kill the service, just click on the bat file.

 

@echo off
setlocal

set "PORT=8090"

for /f "tokens=5" %%a in ('netstat -ano ^| findstr :%PORT%') do (
    set "PID=%%a"
    goto :KillProcess
)

echo No process found using port %PORT%.
goto :End

:KillProcess
echo Killing process with PID %PID%...
taskkill /F /PID %PID%
goto :End

:End
endlocal

 

answered