JSReport server automatically closes after being idle for too long



  • Hi,

    I am currently using JSReport on the free version and every time I come back to work in the morning, I found the server shut down, without any logs. I wonder if it is just a free version limitation or is it somewhat a bug. Thanks!



  • This has nothing to do with the licensing.

    Please share the details... what is in the logs, what is your jsreport version, what is your os, exact steps how do you install and start jsreport, do you use pm2 or windows service to keep jsreport running after system reboot?



  • Oh, in fact, I found this in my error log.

    2019-02-19T01:35:55.548Z - error: uncaughtException: ENOENT: no such file or directory, scandir 'C:\Users\Jeremy\AppData\Local\Temp\jsreport\autocleanup' date=Tue Feb 19 2019 09:35:55 GMT+0800 (China Standard Time), pid=15172, uid=null, gid=null, cwd=C:\Users\Jeremy\Documents\jsreportapp, execPath=C:\Program Files\nodejs\node.exe, version=v8.11.3, argv=[C:\Program Files\nodejs\node.exe, C:\Users\Jeremy\AppData\Roaming\npm\node_modules\jsreport-cli\cli.js, start], rss=124514304, heapTotal=73613312, heapUsed=66753424, external=153516, loadavg=[0, 0, 0], uptime=489691.4501379, trace=[column=18, file=fs.js, function=Object.fs.readdirSync, line=904, method=readdirSync, native=false, column=20, file=C:\Users\Jeremy\Documents\jsreportapp\node_modules\reap2\index.js, function=null, line=98, method=null, native=false, column=null, file=null, function=Array.forEach, line=null, method=forEach, native=false, column=13, file=C:\Users\Jeremy\Documents\jsreportapp\node_modules\reap2\index.js, function=Reaper.start, line=97, method=start, native=false, column=14, file=C:\Users\Jeremy\Documents\jsreportapp\node_modules\jsreport-core\lib\reporter.js, function=Timeout.setInterval [as _onTimeout], line=769, method=setInterval [as _onTimeout], native=false, column=11, file=timers.js, function=ontimeout, line=498, method=null, native=false, column=5, file=timers.js, function=Timer.unrefdHandle, line=611, method=unrefdHandle, native=false], stack=[Error: ENOENT: no such file or directory, scandir 'C:\Users\Jeremy\AppData\Local\Temp\jsreport\autocleanup', at Object.fs.readdirSync (fs.js:904:18), at C:\Users\Jeremy\Documents\jsreportapp\node_modules\reap2\index.js:98:20, at Array.forEach (<anonymous>), at Reaper.start (C:\Users\Jeremy\Documents\jsreportapp\node_modules\reap2\index.js:97:13), at Timeout.setInterval [as _onTimeout] (C:\Users\Jeremy\Documents\jsreportapp\node_modules\jsreport-core\lib\reporter.js:769:14), at ontimeout (timers.js:498:11), at Timer.unrefdHandle (timers.js:611:5)]

    And for the info you asked for:
    jsreport Version 2.3.0
    Windows
    installed via node.js -> jsreport init -> only used HTTP port, default for the other settings
    I did not use windows service to keep it running, but I am quite sure that the machine has been up and running for the night.



  • It seems like something on your system is deleting this folder

    C:\Users\Jeremy\AppData\Local\Temp\jsreport\autocleanup'
    

    Are you able to somehow find out what is doing it?



  • FWIW - I'm getting this too - there is nothing on my machine that should be deleting this folder...



  • However, there is likely something that is deleting it. jsreport for sure doesn't :)

    I submitted a task to make sure jsreport ensure this folder when it's needed
    https://github.com/jsreport/jsreport/issues/492

    In the meantime, I recommend running jsreport with some supervisor that automatically restarts it on crash.
    On windows the windows service makes sense.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.