pure-ftpd 100% cpu usage

Guys,

I'm using Linode 1024 and the server is not even lived yet. I'm using it for deployment and testing process only.

I keep getting notification of exceeding cpu usage allocation from Linode almost every week. Here's what I found on the on the server using top command.

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
17545 web17     20   0 40812 2676 1880 R  100  0.3  71:16.31 pure-ftpd-mysql    
17631 web17     20   0 40812 2676 1880 R  100  0.3  66:13.26 pure-ftpd-mysql    
17728 web17     20   0 40812 2680 1880 R  100  0.3  63:25.91 pure-ftpd-mysql 

I decided to kill them all, but I wonder why it's spiking that bad?

I'm enabling SSL/TLS option on Ubuntu 10.04 pure-ftp conf with ISPConfig 3.4 as the control panel working as a slave to another ISPConfig master installation on other server.

I'm using Transmit 4.1.7 with Passive Mode on.

Any thought on this?

9 Replies

Graphs should tell you when the CPU-usage starts. What do the logfiles say around that time? See if you can find the trigger. If not, do more verbose logging and see if that'll give more information.

Thanks for the suggestion.

That's when I uploaded and downloaded quite a couple hundred files, which I believe will not exceed a thousand.

I notice that this might happened during the upload/download. Should I try replicate the problem again? If yes it's caused by uploading/downloading quite a lot of files, do you think there is something that I can do to avoid this?

I have another VPS running on Ubuntu 10.10 under OpenVZ and it seems to run just fine. It only happens on Ubuntu 10.04 under all Linode VPS. I haven't tested this on Ubuntu 10.04 outside from Linode, coz my other VPS provider only support Ubuntu 10.10 above.

Anybody have some thought on this?

PS: I'm quite clueless at the moment.

I think I found the solution. Basically chaning the kernel from 3.0.18-x86x64-linode24 to 3.2.1-x8664-linode23 fix the problem. Hopefully it helps someone that encounter the same issue as me.

EDITED:

After some heavy testing, the FTP back to 100% usage :(

Heh, too bad not too many responses here -

What about SFTP? Does that give load issues as well when transferring a lot of/ large files? Or is it purely through FTP?

I assume you did try reinstalling the ftpd?

Note: I do everything through SFTP - perhaps that'll work for you as well to prevent the problem. It's not a solution, but at least you won't have problems transferring files anymore. (and it's more secure)

Dumb question maybe - but you're sure it's not a herd of bots hammering against your server trying default passwords and stuff?

@nuvini: I did, that's the the temp solution that we use as of now. The reason why I want to make this FTP server running is because we tend to have client creating one vhost and let it be shared to multiple users through sub directories. With this approach, we need to have a way for other people accessing the sub directories directly without seeing the root folder. ISPConfig allow FTP path being modified from reseller/client privilege, but SSH need to be done by admin (I believe it's for security reason), which is not what we're looking for.

@rsk: I'm very sure it's not that, coz I monitored using top while uploading and the pid was created during the upload. Considering that maybe there's trojan on my computer, but I can reproduce the same problem with the other computer as well.

I fixed the problem thanks to falko from the author of the ISPConfig itself. Here's the instruction that I used in compiling a pure-ftpd-mysql without capabilities, which solves the problem on Linode platform.

http://www.faqforge.com/linux/controlpa … s-enabled/">http://www.faqforge.com/linux/controlpanels/how-to-build-a-pure-ftpd-debian-package-for-openvz-virtual-machines-without-capabilities-enabled/

The article title is a bit misleading somehow, considering that I use OpenVZ on my other VPS and it works just fine, while on Linode under Xen I'm facing this problem.

Hope it helps other tat might face the same problem as me.

Happy administering!

Glad you got it fixed - thanks for posting the solution as well. I'm sure it'll help others who face the same problem :)

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