Upstart说我的脚本正在运行,但API在我重新启动进程之前不返回数据

Upstart says my script is running but the API not returning data until I restart the process

本文关键字:重新启动 进程 数据 返回 脚本 我的 运行 Upstart API      更新时间:2023-09-26

我有 Ubuntu 14.04 和以下 Upstart 文件,用于 RESTful API。

description "myFoodLab API - node.js server"

author "b3nk3"

# used to be: start on startup

# until we found some mounts weren't ready yet while booting:

start on runlevel [2345]

start on started mountall

stop on shutdown

# Automatically Respawn: respawn respawn limit 20 5

script export HOME="/www-data"

exec sudo -u www-data /usr/bin/node /var/www/html/mydomain.co.uk/subdomain/sco/node_modules/server.js end script

当我检查状态时,我得到它正在运行,但与邮递员检查它无法检索数据。

b3nk3@benserver:~$ sudo initctl status myfoodlabapi

MyFoodLabapi 启动/运行,进程 3685

我的服务器是否有问题.js? 检查日志,似乎在一段时间后停止重新连接。

暴发户脚本完好无损。问题可能出在MySQL连接上。