High CPU Usage

Popular automatic website translation tool

High CPU Usage

Postby xbonize » Sun Feb 01, 2015 1:35 pm

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.
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Edvard » Sun Feb 01, 2015 3:59 pm

Hi,

You may try to check your access logs and block unnecessary bots. You may disable some languages.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: High CPU Usage

Postby xbonize » Sun Feb 01, 2015 4:30 pm

How to disable some language?
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Sun Feb 01, 2015 11:53 pm

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]
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: High CPU Usage

Postby xbonize » Fri Feb 20, 2015 6:28 am

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.
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Fri Feb 20, 2015 10:35 am

Hi,
You may try to check your access logs and block unnecessary bots. The cache size depends of how much content you have .
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: High CPU Usage

Postby xbonize » Tue Feb 24, 2015 6:38 pm

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.
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Wed Feb 25, 2015 12:21 am

Hi,

If you are using 58 languages please disable some unnecessary languages. Also you can consider using GTranslate Enterprise version.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: High CPU Usage

Postby xbonize » Thu Feb 26, 2015 3:59 pm

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/***
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Thu Feb 26, 2015 4:16 pm

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.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: High CPU Usage

Postby xbonize » Thu Feb 26, 2015 4:30 pm

Thank you Yana. I'm appreciate your help. :)
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Thu Feb 26, 2015 4:44 pm

You are welcome!
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: High CPU Usage

Postby xbonize » Fri Feb 27, 2015 5:14 am

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
xbonize
 
Posts: 35
Joined: Tue Mar 13, 2012 7:32 pm

Re: High CPU Usage

Postby Yana » Fri Feb 27, 2015 6:28 pm

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]
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux