DEV Community

Discussion on: The day our web server reached 100% capacity 💾

Collapse
 
huncyrus profile image
huncyrus

Interesting, why a simple RM was the answer for the mails, instead of filtering and keeping important messages (e.g.: business logic related ones) even as an archive?

Cyberduck showed a vague error I can't remember and didn't understand at the time

Aren't task for a devop to know what he/she/they do? (I have the feeling, there is no dedicated devop/sysop working there...)
Totally liked the end conclusion to have a monitoring system setup, because 99% of companies lack of monitoring or understanding this kind of things. (It is super common to say for balancing or scaling to just adding more cpu/memory and thats all instead of investigating why they even need that amount)

Collapse
 
dmahely profile image
Doaa Mahely

Hi there, you're right on us not having a dedicated devOps person as it is a small startup.
The amount of emails was huge and after going through a number of them, I noticed one cron job's response was adding backslashes, the number of which increased exponentially with each email. It reached a point where the entire screen was just filled with backslashes. The cron job's output wasn't incorrect, it was just being parsed incorrectly.

This Stack Overflow answer explains the root cause better:

Why is json_encode adding backslashes?

51

I've been using json_encode for a long time, and I've not had any problems so far Now I'm working with a upload script and I try to return some JSON data after file upload.

I have the following code:

print_r($result); // <-- This is an associative array
echo json_encode($result); //
…