pure-ftpd/fsockopen slow

Discussion in 'Installation/Configuration' started by mjnet, Mar 30, 2012.

  1. mjnet

    mjnet New Member

    Hi there,

    After some mysql optimization trouble I'm now having a disaster with pureftpd or filesystem that will slow down not even my ftp browsing, it will slow down my wordpress too!

    let me explain:
    after an ubuntu (ec2 ami) updgrade my ftp connection will take about 1minute, also every folder opening take same duration of time! this is unacceptable but i can't figure out where this problem is coming from!

    anonter problem is creating wordpress articles. every time i want to create an article wordpress will proceed wp-cron, wich has some fopen or fsockopen functions they're realy slow.

    where's this problem coming from? syslog has no errors!

    only error i figured out at this time is ispconfig cron:
    setquota: Not setting block/inode grade time on /dev/by-label/cloudimg-rootfs because softlimit is no exceeded.
    -> note: i've more than 60% free space on root partition.

    all other events are running fast as normal. also ssh is running normal.
    any ideas why this ftp (and may because of this also fsockopen) is that slow?!

    thank you guys
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This can be caused by dns issues. Check that the dns servers in /etc/resolv.conf are reachable from your server and working. You might want to replace them with the google dns servers, IP addresses are:

    8.8.8.8
    8.8.4.4
     
  3. gleidsonlm

    gleidsonlm New Member

    pureftp amazon ec2 private ip

    I'm having a similar problem. I'm using a Ubuntu Oneiric 11.10 64 EC2 instance at Amazon AWS with a Elastic IP.

    At /etc/hosts I get the correct IP and hostname of my ISPConfig3 instalation and now at /etc/resolv.conf the google cache dns servers.

    Even that, I still having a problem about PureFTP inform at passive mode the EC2 NAT private IP.

    Command: PASV
    Response: 227 Entering Passive Mode (1#,2##,5,1##,111,61)
    Status: Server sent passive reply with unroutable address. Using server address instead.
    Command: MLSD
    Error: Connection timed out
    Error: Failed to retrieve directory listing

    Do you have any suggestion?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Does active mode work?
     
  5. mjnet

    mjnet New Member

    allright i gave them a try but it didn't take any effect. still the same duration of ftp connection and also still the issue with wordpress article creating.

    also every time i do a ftp event (open directory or connect or whatever...) syslog is calling ispconfig server.sh, is that normal?
    Mar 31 14:29:01 web CRON[2035]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    iptables -L
    ?

    That's just a coincidence - that script is run by cron every minute.
     
  7. mjnet

    mjnet New Member

    output is:

    root@web:/home/ubuntu# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    fail2ban-pureftpd tcp -- anywhere anywhere multiport dports ftp
    fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain fail2ban-pureftpd (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-ssh (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    hope you can deal with this!?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Can you switch off fail2ban for testing purposes and try again?
     
  9. mjnet

    mjnet New Member

    i tried that using: root@web:/home/ubuntu# /etc/init.d/fail2ban stop

    but unfortunately no effect :(

    do you have any other ideas?
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    iptables -L 
    after you've stopped fail2ban?
     
  11. mjnet

    mjnet New Member

    after stopping:

    root@web:/etc/pure-ftpd# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
    fail2ban-pureftpd tcp -- anywhere anywhere multiport dports ftp

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain fail2ban-pureftpd (1 references)
    target prot opt source destination

    Chain fail2ban-ssh (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere
     
  12. mjnet

    mjnet New Member

    after stopping of fail2ban:

    root@web:/home/ubuntu# /etc/init.d/fail2ban stop
    root@web:/home/ubuntu# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  13. mjnet

    mjnet New Member

  14. falko

    falko Super Moderator Howtoforge Staff

    That looks like a disabled firewall. :) But it's still not working?
     
  15. mjnet

    mjnet New Member

    Unfortunately it's not :(

    It's quiet annoying to work with that slow ftp.
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Did you have valid nameservers in /etc/resolv.conf?
     
  17. mjnet

    mjnet New Member

    hi falko,

    yes, nameservers are valid ;)

    i got the a more or less acceptable solution now and wanted to let you know.
    unfortunately the slow wordpress was not because ftp, just a plugin update made it broken.

    the ftp is now faster by doing this: http://adamschepis.com/blog/2011/02/...on-amazon-ec2/

    unfortunately i can't connect with any clients expect of my development editors ftp client (coda). why that? :D
     
  18. gleidsonlm

    gleidsonlm New Member

    Yes, indeed works! :)
    Any ideas how to make FTP server use ElasticIP instead eth0 IP?
     

Share This Page