Connecting and Memory Problems

Hello, for the past few days I've been in need of downloaded some items onto my server. I've been having problems connecting through PuTTy and likes however, as I keep getting a 'connection refused' error whenever I try. I've been following the guide to a T, but no luck. After sending in a ticket I've got news that apparently I'm OoMing. Lish has confirmed it. I'm guessing that's why I'm not able to connect to the server? I'm wondering if this indeed the case, and how can I go about fixing it?

6 Replies

Most obvious point of call would be to tone down the amount of childs and maxclients your webserver is running, lower memory limits for php (if possible, wordpress and other software will fail to work without enough memory)

Turn off keepalive or lower the timeout

Take a look at the configs for mysql on "small" systems, if your traffic allows, /usr/share/mysql/my-small.cnf

using top/htop should help you pin down what exactly is eating all your ram

Wow… Well, if I'm not the clueless newbie.

I'm sorry. I have no idea what those things are and how to toggle them. Do you have any sites or anything where I can read up on them?

If your using apache, you can find the configs in /etc/apache2/ usually called httpd.conf (or similar).

You can find the php config at /etc/php5/apache2/php.ini you'll find the option memory_limit in there.

output of top/htop would be handy to actually pin point what is eating your ram. Everything i've said so far is just assumption that your using apache and thats what is eating the ram (which is the likely cause if you are using apache)

Okay, memory problem has been solved. Thanks.

Unfortunately, I'm still have problems with the 'Connection Refused' pop up. Any ideas?

Check your ssh daemon is running, it might have been killed due to no memory being available.````
ps aux | grep ssh

If thats running, check its actually listening properly.````
netstat -tapn | grep 22

Or w/e port you have ssh running on.

If its listening, check your firewall, syslogs, etc. for any errors

Log in via lish and make sure sshd is running.

If there's a firewall setup wherever you're connecting from, make sure it allows connections through whichever port you run sshd on (default is port 22).

If you've tried configuring iptables, check that too, ensure it allows incoming connections on your sshd port.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct