Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: pure-ftpd 100% cpu usage
PostPosted: Tue Mar 13, 2012 11:04 am 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
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.

Code:
  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?[/code]


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 11:12 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
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.


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 11:31 am 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
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?


Top
   
 Post subject:
PostPosted: Mon Mar 19, 2012 4:24 am 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
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.


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2012 12:04 pm 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
I think I found the solution. Basically chaning the kernel from 3.0.18-x86_x64-linode24 to 3.2.1-x86_64-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 :(


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2012 2:49 pm 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
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)


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2012 2:51 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Dumb question maybe - but you're sure it's not a herd of bots hammering against your server trying default passwords and stuff?

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2012 10:31 pm 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
@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.


Top
   
 Post subject:
PostPosted: Thu Mar 22, 2012 6:28 pm 
Offline
Senior Newbie

Joined: Tue Mar 13, 2012 10:35 am
Posts: 6
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/

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!


Top
   
 Post subject:
PostPosted: Fri Mar 23, 2012 3:39 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
Glad you got it fixed - thanks for posting the solution as well. I'm sure it'll help others who face the same problem :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group