Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
techwiki:aws [2019/10/20 09:23]
ying [Disable PageSpeed on Apache]
techwiki:aws [2020/03/30 03:40] (current)
ying [Website Cant Do Editing and Disk is Full]
Line 261: Line 261:
   * Problem: browse can't open website, long loading.   * Problem: browse can't open website, long loading.
     * solution: Go ssh in terminal and restart apache server     * solution: Go ssh in terminal and restart apache server
 +
 +===== Website Cant Do Editing and Disk is Full =====
 +
 +  - ssh into the server and check disk global size <​code>​df -h</​code>​
 +  - then you will see which partition is full, cd to that place to check each folder
 +    - to check current folder size: <​code>​du -sh .</​code>​
 +    - to list all sub folder with size info <​code>​du -sh *</​code>​
 +    - to list all file with size info <​code>​ls -lh</​code>​
 +  - potential Big Size eater
 +    - check A: go apache'​s log folder <​code>​apache2/​logs ​
 +error_log-*.gz
 +access_log-*.gz
 +</​code>​
 +    - check B: go apache'​s mod_pagespeed folder <​code>​
 +// https://​docs.bitnami.com/​aws/​apps/​orocrm/​administration/​use-pagespeed/​
 +// apache2/​var/​cache/​mod_pagespeed/​
 +// if you dont use that feature, just delete all inside
 +// rm -rf *
 +// restart apache ​
 +// (for bitnami: sudo /​opt/​bitnami/​ctlscript.sh restart apache)
 +</​code>​
 +    - check C: check mysql database folder
 +      - login mysql (for bitnami, same as main app pass) <​code>​mysql -u root -p</​code>​
 +      - check database size <code sql>
 +SELECT table_schema AS "​Database", ​
 +ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" ​
 +FROM information_schema.TABLES ​
 +GROUP BY table_schema;​
 +</​code>​
 +      - check each database'​s table size <code sql>
 +SELECT table_name AS "​Table",​
 +ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
 +FROM information_schema.TABLES
 +WHERE table_schema = "​database_name"​
 +ORDER BY (data_length + index_length) DESC;
 +</​code>​
 +      - type quit to exit mysql