Wordpress issues Database connection errors

I receive database connection issues with wordpress.
Every time one of the sites is visited the /tmp increases by about 1%. It is filled with npm stuff. The only way to fix it is to to rm -rf /tmp/npm*
or reboot the server. What can I do to fix this?

It’s quite strange you have a npm file each time your wordpress has been visited.
Because, wordpress do not uses nodejs nor npm. Are you really sure these files comming when your wordpress is visited ?

Can you check what the files contain ?

They dont contain anything that I can find out who is making them.
The wordpress nginx log says

2017/09/23 15:57:51 [error] 8846#0: *1047 FastCGI sent in stderr: "rdPress database error Disk full (/tmp/#sql_4a8_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") for query SHOW FULL COLUMNS FROMwp_optionsmade by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, Jetpack_Sync_Actions::init, Jetpack_Sync_Actions::sync_allowed, Jetpack::is_staging_site, Jetpack::validate_sync_error_idc_option, get_transient, delete_option

I really dont know what to do.

Wordpress says what I expected it says…
There no problem with wordpress, there is a problem with thoses npm files whitch fill your disk.

Can you show me the user who own this kind of file and the content of one of them please.
The matter is to find who fill your disk like that.

Do you know if you use an application which uses nodejs ?

The user that creats it is etherpad_mypads even though I uninstalled it. How is that possible?

I uninstalled it last week

Maybe there’s something left

Can you give me the content of one of those files ?

root@tgx:/tmp# cd npm-6870-e32ffab4         
root@tgx:/tmp/npm-6870-e32ffab4# ls
root@tgx:/tmp/npm-6870-e32ffab4# ls
root@tgx:/tmp/npm-6870-e32ffab4# cd registry.npmjs.org
root@tgx:/tmp/npm-6870-e32ffab4/registry.npmjs.org# ls 
cheerio  clean-css  ejs  express  express-session  graceful-fs	jsonminify  log4js      measured  mocha  npm  resolve  semver  socket.io  supertest  uglify-js  unorm

Can you check the directory /opt/node_n and especially the file /opt/node_n/ynh_app_version please.

And check if you have a file /etc/cron.daily/node_update

root@tgx:/# cd /opt/node_n and especially the file /opt/node_n/ynh_app_version
root@tgx:/opt/node_n# ls
bin  etc  include  lib	n  share  ynh_app_version

Thats what I have there


In that file it says etherpad_mypads:4.8.3
and I dont have this file /etc/cron.daily/node_update

thank you for your help

Sorry, my connection went down 4 hours ago…
I use my fallback server…

So, I think it’s something about our recent change in the nodejs helper. Sorry about that.
We’re gonna clean that together if you agree :wink:

First, what I’m wondering is how etherpad can be still running if you have remove it a week ago.
So, let’s see is there something in

  • /var/www/etherpad_mypads
  • Something about etherpad in /etc/systemd/system/
  • And maybe an user etherpad, I think so. getent passwd etherpad_mypads

And you can already remove the node version manager

rm -r /opt/node_n
rm -r /usr/local/n

And clean the line(s) in /root/.bashrc about N_PREFIX

Thank you!
So for starters there is alot of stuff in
/var/www/etherpad_mypads root@tgx:/var/www/etherpad_mypads# ls APIKEY.txt README.md node_modules tests CHANGELOG.md SESSIONKEY.txt settings.json var CONTRIBUTING.md bin settings.json.template LICENSE credentials.json src Makefile doc start.bat

and in
root@tgx:/etc/systemd/system# ls etherpad_mypads.service
So this install obviously didnt work.

root@tgx:/# getent passwd etherpad_mypads etherpad_mypads:x:999:999::/home/etherpad_mypads:/usr/sbin/nologin

I ran those two lines no errors!

I clened that line.
Do I have te delete the other left overs?

Thank you so much!

So… It’s so weird, your etherpad is simply not removed at all…
But, it’s quite late now. So let’s finish the job.

  • For systemd
sudo systemctl stop etherpad_mypads.service 
sudo systemctl disable etherpad_mypads.service 
sudo rm /etc/systemd/system/etherpad_mypads.service 

And remove the service in the admin panel
sudo yunohost service remove etherpad_mypads

  • Remove the debian package
    sudo apt-get purge etherpad_mypads-ynh-deps

  • Delete the database

mysql -u root --password="$(sudo cat /etc/yunohost/mysql)" -B "DROP DATABASE etherpad_mypads;"
mysql -u root --password="$(sudo cat /etc/yunohost/mysql)" -B "DROP USER 'etherpad_mypads'@'localhost';"
  • Remove the main directory
    sudo rm -r /var/www/etherpad_mypads

  • Remove the nginx config
    sudo rm "/etc/nginx/conf.d/YOURDOMAIN.d/etherpad_mypads.conf"

  • Remove the logrotate config
    sudo rm "/etc/logrotate.d/etherpad_mypads"

  • And remove the user
    sudo userdel etherpad_mypads

  • And to finished the job
    Remove the ynh config for etherpad
    sudo rm -r /etc/yunohost/apps/etherpad_mypads
    And reload
    sudo systemctl reload nginx
    sudo yunohost app ssowatconf

And we’d made manually the job of the remove script !

1 Like

Thank you!
It seems to have worked :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.