Forum Archive - High CPU Usage

High CPU Usage
Feb 1, 2015 9:35 am by xbonize
Hello, I'm not sure what happen but suddenly /gtranslate/translate.php (using general version) use a lot of cpu usage on my dedicated server. I cannot upgrade to enterprise, so I need your advice. a. how to reduce cpu usage on translate.php b. for temporary action, how to stop language translation.
Re: High CPU Usage
Feb 1, 2015 11:59 am by Edvard
Hi, You may try to check your access logs and block unnecessary bots. You may disable some languages. Thanks!
Re: High CPU Usage
Feb 1, 2015 12:30 pm by xbonize
How to disable some language?
Re: High CPU Usage
Feb 1, 2015 7:53 pm by Yana
Hi, You can disable some unnecessary languages by redirecting to the homepage . Here is an example of .htaccess rule. RewriteEngine On RewriteRule ^(af|ar|az)/(.*)$ /$2 [R=301,L]
Re: High CPU Usage
Feb 20, 2015 2:28 am by xbonize
My webhosting told me that /gtranslate/translate.php is the process that is running all the time which is something not right. There might be some exploit that used by third party. It is generating too large cache folder and causing my dedicated server now not stable due to large file system on the cache folder.
Re: High CPU Usage
Feb 20, 2015 6:35 am by Yana
Hi, You may try to check your access logs and block unnecessary bots. The cache size depends of how much content you have .
Re: High CPU Usage
Feb 24, 2015 2:38 pm by xbonize
My webhosting has check it and told me that there is no bad bots attack my server. ONLY /gtranslate/translate.php is running all the time.
Re: High CPU Usage
Feb 24, 2015 8:21 pm by Yana
Hi, If you are using 58 languages please disable some unnecessary languages. Also you can consider using GTranslate Enterprise version.
Re: High CPU Usage
Feb 26, 2015 11:59 am by xbonize
My issue are: 1. gtranslate/translate.php (using general version) use a lot of cpu 2. server not stable due to large file system on the cache folder. Please advise whether my planning are right 1. Wrap all countdown timer/visitor counter module with class="notranslate" 2. Disable some of the not necessary languages with htaccess 3. Remove all file and folder in /gtranslate/cache/***
Re: High CPU Usage
Feb 26, 2015 12:16 pm by Yana
Hi, If you have a problem with the server you can consider using GTranslate Enterprise version. 1. Yes , wrap dynamic content with class="notranslate" 2. Yes 3. If you have disk space problem also you can delete the cache files only for unnecessary languages. If you delete the cache files for all languages it will start translating again.
Re: High CPU Usage
Feb 26, 2015 12:30 pm by xbonize
Thank you Yana. I'm appreciate your help. :)
Re: High CPU Usage
Feb 26, 2015 12:44 pm by Yana
You are welcome!
Re: High CPU Usage
Feb 27, 2015 1:14 am by xbonize
Another question :oops: I want to disabled almost all languages (redirect to the homepage) except for English and Afrikaans only. Please give me a complete gtranslate .htaccess rules
Re: High CPU Usage
Feb 27, 2015 2:28 pm by Yana
Hi, If you are using gtranslate Pro general version you can modify .htaccess rules and replace [a-z]{2}|zh-CN|zh-TW with the language codes which you want to use .For example en|af . Please add the language code of your default language also. RewriteRule ^(en|af)/(en|af)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^(en|af)/(en|af)$ /$1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(en|af)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA] RewriteRule ^(en|af)$ /gtranslate/translate.php?lang=$1 [L,QSA] If you are using GTranslate Joomla system plugin version you need to use the following rules to redirect unwanted languages to the homepage RewriteEngine On RewriteRule ^(ar|az)/(.*)$ /$2 [R=301,L] RewriteRule ^(be|bg|ca)/(.*)$ /$2 [R=301,L] RewriteRule ^(cs|cy|da)/(.*)$ /$2 [R=301,L] RewriteRule ^(el|es|et)/(.*)$ /$2 [R=301,L] RewriteRule ^(eu|fa|fi)/(.*)$ /$2 [R=301,L] RewriteRule ^(fr|ga|gl)/(.*)$ /$2 [R=301,L] RewriteRule ^(hi|hr|ht)/(.*)$ /$2 [R=301,L] RewriteRule ^(hu|hy|id)/(.*)$ /$2 [R=301,L] RewriteRule ^(is|it|iw)/(.*)$ /$2 [R=301,L] RewriteRule ^(ja|ka|ko)/(.*)$ /$2 [R=301,L] RewriteRule ^(lt|lv|mk)/(.*)$ /$2 [R=301,L] RewriteRule ^(ms|mt|nl)/(.*)$ /$2 [R=301,L] RewriteRule ^(no|pl|pt)/(.*)$ /$2 [R=301,L] RewriteRule ^(ro|ru|sk)/(.*)$ /$2 [R=301,L] RewriteRule ^(sl|sq|sr)/(.*)$ /$2 [R=301,L] RewriteRule ^(sv|th|tl)/(.*)$ /$2 [R=301,L] RewriteRule ^(tr|uk|ur)/(.*)$ /$2 [R=301,L] RewriteRule ^(vi|yi|zh-CN|zh-TW)/(.*)$ /$2 [R=301,L]

SIMILAR TOPICS

Is there any usage statistics for selected languages?Apr 7, 2016 8:29 pmReplies: 9Post by: lesufomu
Some bad URLs and high load on website - bad config?Aug 11, 2017 9:18 pmReplies: 3Post by: Ant_Z
high number files /cacheJan 29, 2016 5:22 amReplies: 1Post by: enwebsoluciones
Disk space usage explode!Feb 20, 2015 8:27 amReplies: 1Post by: nandasatria
files and CPU usage too highJan 26, 2015 6:57 amReplies: 3Post by: ricardo

Try GTranslate with a free 15 day trial