-1

nice people ;)

I have a problem with my server after I setup a new theme on one of my wordpress sites.

At first mySQL started to crash once in a while, then it became more and more often and now you click on any page and the whole VPS Server goes down. Cant even login with SSH to it. It seems like mySQL doesn't have anough memory to work with new wordpress theme (yes, it looked strange even to me).

So I added an extra SWAP file. It's now 1024. Nothing I upgraded my VPS plan its 2048mb RAM (instead of 512) and doubed the CPU. Nothing. Somewhere I heard it could be kernel... but here I need your advice.

What could this be? On its own mySQL works fine. It just cannot work with this new theme... I can thange the theme of course, but I doubt that one theme can have so much power... It must be something else.

I post here the error log file and the server setup and log files.

The server is:

Linux 3.2.0-4-686-pae on i686
Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz, 2 cores

When the theme is disabled, and there is no traffic yet as it is in development stage, on average I get:

CPU load averages   0.04 (1 min) 0.10 (5 mins) 0.17 (15 mins)
CPU usage   3% user, 0% kernel, 0% IO, 97% idle
Real memory 107.39 MB used, 1.98 GB total
Virtual memory  772 kB used, 1023.99 MB total
Local disk space    7.20 GB used, 59.06 GB total

When the theme is on - APOCALIPSE ... :::

151010 10:53:22 mysqld_safe Number of processes running now: 0
151010 10:53:23 mysqld_safe mysqld restarted
2015-10-10 10:53:38 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27) starting as process 6558 ...
2015-10-10 10:53:38 6558 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2015-10-10 10:53:38 6558 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2015-10-10 10:53:38 6558 [Note] Plugin 'FEDERATED' is disabled.
2015-10-10 10:53:38 6558 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-10 10:53:38 6558 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-10 10:53:38 6558 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-10 10:53:38 6558 [Note] InnoDB: Memory barrier is not used
2015-10-10 10:53:38 6558 [Note] InnoDB: Compressed tables use zlib 1.2.7
2015-10-10 10:53:38 6558 [Note] InnoDB: Using Linux native AIO
2015-10-10 10:53:38 6558 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-10 10:53:38 6558 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-10 10:53:38 6558 [Note] InnoDB: Completed initialization of buffer pool
2015-10-10 10:53:38 6558 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-10 10:53:38 6558 [Note] InnoDB: The log sequence numbers 1626007 and 1626007 in ibdata files do not match the log sequence number 58885888 in the ib_logfiles!
2015-10-10 10:53:38 6558 [Note] InnoDB: Database was not shutdown normally!
2015-10-10 10:53:38 6558 [Note] InnoDB: Starting crash recovery.
2015-10-10 10:53:38 6558 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-10-10 10:53:38 6558 [Note] InnoDB: Restoring possible half-written data pages
2015-10-10 10:53:38 6558 [Note] InnoDB: from the doublewrite buffer...
2015-10-10 10:53:38 6558 [Note] InnoDB: 128 rollback segment(s) are active.
2015-10-10 10:53:38 6558 [Note] InnoDB: Waiting for purge to start
2015-10-10 10:53:38 6558 [Note] InnoDB: 5.6.27 started; log sequence number 58885888
2015-10-10 10:53:38 6558 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2015-10-10 10:53:38 6558 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2015-10-10 10:53:38 6558 [Note] Server socket created on IP: '127.0.0.1'.
2015-10-10 10:53:38 6558 [Note] Event Scheduler: Loaded 0 events
2015-10-10 10:53:38 6558 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.27'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
Killed

From syslog, a little earlier:

Oct 10 10:53:19 151-248-121-240 kernel: [ 2204.772654] Out of memory: Kill process 6400 (mysqld) score 42 or sacrifice child
Oct 10 10:53:19 151-248-121-240 kernel: [ 2204.772677] Killed process 6400 (mysqld) total-vm:429384kB, anon-rss:78316kB, file-rss:0kB

Thank you very much.

MAXIM
  • 111
  • 5

1 Answers1

0

Your specific theme would have more queries to the database and it may not have optimized queries. You should enable the slow queries on MySQL and see those queries.

Also you should use MYSQL tuner like MySQL Tuner.

Noob2015
  • 1
  • 1
  • mySQL tuner gives me this: – MAXIM Oct 10 '15 at 15:40
  • -------- Performance Metrics ------------------------------------------------- [--] Up for: 1h 11m 25s (1K q [0.366 qps], 18K conn, TX: 3M, RX: 3M) [--] Reads / Writes: 100% / 0% [--] Total buffers: 169.0M global + 1.1M per thread (151 max threads) [OK] Maximum possible memory usage: 329.4M (16% of installed RAM) – MAXIM Oct 10 '15 at 15:41
  • [OK] Slow queries: 0% (0/1K) [OK] Highest usage of available connections: 3% (5/151) [OK] Key buffer size / total MyISAM indexes: 8.0M/123.0K [!!] Query cache efficiency: 0.0% (0 cached / 55 selects) [OK] Query cache prunes per day: 0 – MAXIM Oct 10 '15 at 15:42
  • [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1 sorts) [OK] Temporary tables created on disk: 6% (72 on disk / 1K total) [OK] Thread cache hit rate: 99% (5 created / 18K connections) [OK] Table cache hit rate: 74% (431 open / 579 opened) [OK] Open file limit used: 6% (68/1K) – MAXIM Oct 10 '15 at 15:42
  • [OK] Table locks acquired immediately: 100% (72 immediate / 72 locks) [!!] Connections aborted: 95% [OK] InnoDB data size / buffer pool: 57.0M/128.0M – MAXIM Oct 10 '15 at 15:42
  • 2
    @MAXIM: Please use the edit button below your question to add this information to the original question, and use the formatting tools to make it legible. This information is useless as comment. – Sven Oct 10 '15 at 16:08