C++ Debian程序提前结束(systemd登录:已删除会话)

C++ Debian程序提前结束(systemd登录:已删除会话),c++,debian,winscp,jsoncpp,C++,Debian,Winscp,Jsoncpp,我有一个远程debian jessie服务器,我有时通过命令行工具使用sftp客户端WinSCP在上面运行我的程序。 我的程序发送大量http请求以从另一个站点获取api响应。整个过程大约需要2-3个小时。早些时候还可以,但最近它开始在随机时间意外退出,在/var/log/中的日志文件中没有任何痕迹,除了奇怪的“会话已删除”消息,如下所示: Feb 12 16:34:00 Debian-82-jessie-64-LAMP systemd-logind[570]: Removed session

我有一个远程debian jessie服务器,我有时通过命令行工具使用sftp客户端WinSCP在上面运行我的程序。 我的程序发送大量http请求以从另一个站点获取api响应。整个过程大约需要2-3个小时。早些时候还可以,但最近它开始在随机时间意外退出,在/var/log/中的日志文件中没有任何痕迹,除了奇怪的“会话已删除”消息,如下所示:

Feb 12 16:34:00 Debian-82-jessie-64-LAMP systemd-logind[570]: Removed session 11360.
Json::Value root;
Json::Reader reader;
bool parsedSuccess = reader.parse(data, root, false);
if (parsedSuccess)
{
    for (int j = 0; j < root.size(); j++)
    {
        // looks like the program quits before this loop ends.
        LogLine(root[j].get("user_id", "0").asString());
    }
}
这发生在程序停止向自己的日志文件写入进度并退出的同一秒。 此外,它似乎停止处理与jsoncpp相关的解析代码,如下所示:

Feb 12 16:34:00 Debian-82-jessie-64-LAMP systemd-logind[570]: Removed session 11360.
Json::Value root;
Json::Reader reader;
bool parsedSuccess = reader.parse(data, root, false);
if (parsedSuccess)
{
    for (int j = 0; j < root.size(); j++)
    {
        // looks like the program quits before this loop ends.
        LogLine(root[j].get("user_id", "0").asString());
    }
}
Json::Value root;
Json::阅读器;
bool parsedSuccess=reader.parse(数据,根,false);
if(parsedsucces)
{
对于(int j=0;j
如果接收到的json中没有“user_id”字段,会发生这种情况吗? 如果这是我的问题,我可以使用什么样的演练

我还将jsoncpp更新为最新版本,但没有任何帮助

基本上我不知道原因是什么:删除会话还是程序崩溃?我不明白为什么我在debian日志中也没有看到任何崩溃消息:(


请帮帮我

这是系统性精神病,我正在检查,我会报告的。这是系统性精神病,我正在检查,我会报告的。