haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.25k stars 1.54k forks source link

memory leak when using webdav #1934

Closed paolostivanin closed 7 years ago

paolostivanin commented 7 years ago

I am syncing my WhatsApp folder using Folder Sync. Unfortunately, the sync is done over webdav because Seafile is not (yet?) supported by the app. And Seafile mobile app doesn't allow to sync custom folders. I have noticed that after 4-5 syncs, the swap usage of the seaf-server process increases to 240MB. If I don't restart the process, with subsequent sync the usage increases. Moreover, I have plenty of RAM available, so I don't really understand why the process is swapping.

paolostivanin commented 7 years ago

Memory usage by process:

       806.41 Mb /usr/bin/mysqld 
       760.21 Mb seaf
       534.40 Mb /bin/java 
        93.23 Mb /usr/sbin/python2.7 
        83.50 Mb /usr/bin/python /usr/bin/fail2ban
        73.16 Mb python2.7 /home/seafile/seafile
        72.87 Mb python2.7 /home/seafile/seafile
        48.45 Mb python2.7 /home/seafile/seafile
        48.45 Mb python2.7 /home/seafile/seafile
        48.45 Mb python2.7 /home/seafile/seafile
        48.45 Mb python2.7 /home/seafile/seafile
        36.48 Mb /usr/sbin/python2.7 
paolostivanin commented 7 years ago

ps aux --sort pmem

seafile  32194  0.0  0.5 181364 21164 ?        S    21:11   0:00 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
seafile  32185  0.0  0.5 181364 21168 ?        S    21:11   0:00 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
seafile   9026  0.0  0.6 181364 22232 ?        S    Jul23   0:27 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
seafile   8863  0.0  0.7 211544 26816 ?        Sl   Jul23   0:07 /usr/sbin/python2.7 -m seafevents.main --config-file /home/seafile/conf/seafevents.conf --loglevel debug --logfile /home/seafile/logs/seafevents.l
root       686  0.0  0.7 1232632 27436 ?       Sl   Jul08  23:19 /usr/bin/python /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x -b
root       314  0.0  1.5 219616 55584 ?        Ss   Jul08   1:25 /usr/lib/systemd/systemd-journald
seafile   8864  0.0  1.5 437392 56688 ?        Sl   Jul23   0:47 /usr/sbin/python2.7 -m wsgidav.server.run_server runfcgi --log-file /home/seafile/logs/seafdav.log --pid /home/seafile/pids/seafdav.pid --port 808
seafile  32155  0.9  2.1 241836 80232 ?        S    21:10   0:01 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
seafile  31821  0.6  2.1 242248 80508 ?        S    21:09   0:01 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
seafile  31311  0.2  2.1 241836 80576 ?        S    21:04   0:01 python2.7 /home/seafile/seafile-pro-server-6.1.3/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile=/home/seafile/seafile-pro-server-6.1.3/
mysql     8747  0.1  3.1 898032 114944 ?       Ssl  Jul23   5:26 /usr/bin/mysqld
seafile   8893  0.0  3.8 2858168 141636 ?      Ssl  Jul23   0:39 seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/sea
seafile   8865  0.2  7.3 4596856 273116 ?      Sl   Jul23  12:20 /bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSIniti