Recently I faced one weird issue with Nginx and suddenly getting an error on restarting Nginx "Cannot allocate memory" issue as showing in the following image.
So, if you are facing any such issue, please check your configuration files and see if somewhere you are allocating more memory then available.
I hope this post will help someone else as well!
Thanks! Enjoy Programming!