On the previous hosting, when a task was executed and if suddenly a problem (error) occurred during its operation, it was accompanied by a brief summary, including a specific place (file) and a string.

Now I have moved to another hosting and there is no such thing. After the crash, task is the only word after:

Killed

How to enable the output of the mini-log, as it was before? After all, now I don’t even know where to look ... There is nothing about this in the log files.

  • Guessing that in theory can be on the hosting is not very interesting. But it seems that the process is being killed by the hosting, out of place, and therefore has no time to withdraw, because from his point of view everything is ok. - D-side
  • @ D-side I took a drop on DO. I set everything up according to their own articles, they are written in great detail. But I doubt that I did something wrong in the process of setting up the server, since there is a business for an hour, and stupidly copy-paste. - Colibri
  • Perhaps, the RAM stupidly ended, the OOM-killer came and killed everyone without explanation. Follow the system load at the time of the fall. - D-side
  • @ D-side is only 512 Mb, now it draws a free example 7-9 Mb. As the task was started, the RAM was cleared, and then reached 7-9 again. So it jumps in this range with a running task. As for the site itself, it fell. On the site, the publick / 500.html stub works. In short, is it a ram? - Colibri
  • @ D-side site fell, but now the task does not fall. Looks like the server pulls one thing. Not sure how much it takes to run Rails applications with 2-4 tasks running at the same time? - Colibri

1 answer 1

No

Because from the point of view of the application, everything is in order.

But from the point of view of the OS - not very.

The symptoms are very similar to the lack of RAM (no output and a lonely killed after completion). When the memory remains critically low, the OOM-killer is triggered, which, according to the otfonarny algorithm, crashes some working process, which frees up the resources it uses. This is an emergency situation , during normal operation it should not occur at all, and if it does, it is necessary to take action.

This can be solved in only one way: by preventing a lack of RAM. Either by expanding the available volume (not necessarily physical RAM, it can be done by swapping ), or by reducing its consumption, of your choice.

  • I understand you. The problem arises because of the conflict of the project, which lies in the RAM with the task, which runs in parallel. The worker is with me 1. Can I solve the problem in any way except for the upgrade of the piece of iron, since the tasks in my project are very important? - Colibri
  • @Colibri reduce by any means the consumption of RAM of individual components. You can even try to connect them by running tasks in the threads of the web server process. So there will be no duplication, but if it falls, then completely. You can also try to start the task from the web server when launching the task (it starts the task from somewhere inside), so duplication (Ruby 2.0+) will still be smaller than that of the independent launch. So at least there will be a chance that only the task will fall, and not the whole system. - D-side