Home › Forum › Problemi Vari con WP › Picchi di utilizzo RAM inspiegabili, non so più dove sbattere la testa!
-
AutorePost
-
-
12 Giugno 2011 alle 10:30 #18167Nickts89Partecipante
Ciao a tutti,
premetto che ho un blog (www.nicolozarotti.com) che gira su WP 3.1.3 su Linux (architettura x86_64)con Apache 2.2.17.
Ultimamente sto avendo un problema molto strano: spesso e volentieri mi compare l’errore “500 Internal Server Error” – sempre in modo discontinuo e non costante – e non ne riesco a venire a capo nemmeno con l’assistenza del mio hosting (che anzi sostiene non si tratti del server ma di cattiva ottimizzazione del blog e mi suggerisce di passare a VPS).
Ho provato a installare WP Super Cache, ma non è cambiato nulla. Ho provato W3 Total Cache, e nada pure quello. Per carità , il tempo di caricamento è migliorato e di sicuro il peso delle pagine e del DB è diminuito grazie al caching, ma l’errore compare ancora.
Inoltre, se vado nell’error log del server tramite CPanel, trovo questo:
[Sun Jun 12 05:16:09 2011] [error] [client 66.249.72.246] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 05:16:09 2011] [error] [client 66.249.72.246] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 05:10:38 2011] [error] [client 93.36.215.6] File does not exist: /home/zarottin/public_html/favicon.ico, referer: http://remolle.blogspot.com/2011/06/e-finita.html
[Sun Jun 12 05:05:02 2011] [error] [client 78.12.161.54] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 05:05:02 2011] [error] [client 78.12.161.54] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 04:47:34 2011] [error] [client 150.70.97.43] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 04:47:34 2011] [error] [client 150.70.97.43] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/wp-content/plugins/wp-minify/min/index.php
[Sun Jun 12 04:37:05 2011] [error] [client 66.249.72.246] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
[Sun Jun 12 04:37:05 2011] [error] [client 66.249.72.246] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/zarottin/public_html/index.php
Il che farebbe supporre un problema di memoria, nonostante il caching.
Il blog in effetti arriva a richiedere spesso più di 1GB di RAM live (che è il mio limite), cosa alquanto strana per un sito con una media di 800-1000 accessi unici al giorno.
Queste sono le statistiche dell’utilizzo di risorse negli ultimi 7 giorni:
Oltre al caching, ho ridotto di 1/3 il numero dei plugin, alleggerito drasticamente le 2 sidebar e cancellato pagine inutili, ma tutto invano.
Io purtroppo sono uno studente che si autofinanzia e non posso permettermi di passare – inutilmente – a un VPS.
Qualcuno di voi può darmi una mano? Non so veramente più cosa fare.
Grazie mille in anticipo!
-
12 Giugno 2011 alle 15:29 #85358Nickts89Partecipante
Ho provato anche a disattivare tutti i plugin, ma i picchi di 1 GB continuano a verificarsi.
-
12 Giugno 2011 alle 17:45 #85366zhenyaPartecipante
..in effetti arriva a richiedere spesso più di 1GB di RAM live (che è il mio limite)..
Se dici che il servizio host ti invita a passare al Vps dovrebbe significare che, attualmente, il tuo sito sta in share host (webhosting); quindi come puoi determinare di avere disponibili 1 Gb? Potresti specificare meglio questo passaggio.
Inoltre, se i plugins non sono una valanga, potresti dire quali sono (mettendoli tutti di seguito separati con le virgole, senza fare un elenco andando a capo per ognuno).
-
12 Giugno 2011 alle 23:10 #85370Nickts89Partecipante
Il mio sito sta in un host condiviso, sà¬. Il limite di 1 GB lo evinco dalle statistiche di performance e comunque mi è stato confermato dal provider.
I plugin attivi al momento sono i seguenti:
Adsense-Deluxe; Adsense Target; Advanced Random Posts; Advertising Manager; Akismet; All in One SEO Pack; Evermore; FaceBook Share (New); Fast Secure Contact Form; Google Analyticator; Google Analyticator; Popularity Contest; Post-Plugin Library; Similar Posts; Simple Facebook Share Button; Smart Youtube; W3 Total Cache; WP-PageNavi; WP-PageNavi.
-
13 Giugno 2011 alle 12:23 #85386zhenyaPartecipante
I problemi della tua installazione sono molteplici, elencarli tutti sarebbe una consulenza e non un semplice supporto per il forum.
A grandi linee:
Si parte con i 60 errori di validazione del codice delle pagine sino a w3tc mal configurato. Ma prima di metter mano al codice io valuterei se sia più conveniente sostituire o modificare il tema visto che, in quello attuale, si utilizza un css ucraino (lo trovi sotto /wp-content/themes/gorodovuchi/style.css) fornito da un sito di dubbia qualità ..
Se visiti, meglio non farlo, la loro pagina wp-themes.org.ua (ATTENZIONE il dominio contiene virus aprire solo se si sa cosa si sta facendo) scopri che è segnalata e compromessa da virus.
Il robots.txt non ha specifiche particolari per limitare alcuni crawler (ad esempio yahoo) che fagocitano pagine (e RAM).
In .htaccess non vedo limiti per gli hotlinking e nemmeno per la navigazione degli archivi.. Sarebbe a dire che /wp-content/uploads/ e compagnia bella sono navigabili da browser, ma per tante ragioni, tra cui la sicurezza, si dovrebbe negarla. Inoltre carichi nella cartella uploads immagini senza usare una loro specifica directory..
Ed ancora; il dominio è raggiungibile sia con il www che non, questo comporta maggior traffico da crawler e altri tipi di analizzatori/fagocitatori di pagine in rete.
Anche gli rss del tuo sito non vanno, può dipendere dal tema o da qualche plugin (più facile il tema).
Come ho detto all’inizio, usi w3tc ma non in maniera ottimale.
-
13 Giugno 2011 alle 21:56 #85403Nickts89Partecipante
Ti ringrazio tantissimo per i consigli!
Purtroppo io non sono molto esperto e, sarò onesto, ho capito poco di quello che mi hai appena detto.
Come posso ottimizzare il robots.txt nel modo che mi hai suggerito?
Dovrei rendere il sito visualizzabile solo col www? Come posso farlo?
Come inserisco i limiti che hai detto nell’htaccess?
Per il tema, ho provato a modificarlo, ma gli errori continuano a comparire imperterriti. Se è necessario, comunque, lo posso cambiare definitivamente.
Per quanto riguarda il feed, se provo a inserire l’indirizzo dell’RSS (http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.nicolozarotti.com%2Frss) mi dice che è valido. E’ comunque difettoso?
So che ti ho riempito di domande, ma ti prego di darmi una mano comunque perché da solo non saprei nemmeno dove mettere le mani.
-
14 Giugno 2011 alle 10:31 #85413zhenyaPartecipante
Il robots.txt ci sono plugin o lo si fa a manina;
togliere il www dovrebbe essere nelle opzioni cPanel del tuo servizio host, poi da Google webmaster tools idem, ma solo dopo aver configurato dall’host;
.htaccess è un file nella root, lo scarichi per averne un backup, lo copi ed apri e ci scrivi nuove regole;
Il tema lo cambierei, ne trovi tanti ottimi su wordpress.org;
l’indirizzo del feed manca dall’html delle pagine, probabile colpa del tema, quindi non lo trova nessun servizio automatico. Per validare si scrive la url del sito non quella diretta al feed, il validatore nella pagina del tuo blog non trova il feed.. poi è ovvio che se nel validator gli copio la url diretta allora funge, ma in realtà manca il collegamento ed è come se quell’indirizzo lo conosci solo te..
-
15 Giugno 2011 alle 7:55 #85464Nickts89Partecipante
Io ti ho chiesto come effettuare le modifiche, se mi dici che devo aprire l’htaccess e scrivere le nuove regole sono esattamente da capo.
Posso capire che uno inesperto possa infastidire un utente navigato con la sua ignoranza, ma se non sbaglio il senso di questo forum è proprio quello di dare una mano ai meno esperti.
Dirmi che ho tanti di quei problemi che darmi una mano sarebbe una consulenza, che le cose si possono fare “a manina” et similia, in tutta onestà , denota una certa arroganza di fondo che non vedo perché debba scaturire dal momento che ho chiarito fin dal principio che non sono un esperto, ma un utilizzatore medio di WP.
Se vuoi darmi una mano veramente, avrei bisogno di sapere che cosa potrebbe causare il problema che ti ho descritto (ho capito i crawler, ma nelle statistiche questi non ciucciano per tutto il giorno, mentre io ho picco di risorse sia RAM che CPU quasi ogni 5 minuti; gli errori si presentano anche cambiando tema; il robots.txt l’ho sistemato con un plugin proprio perchè non so fare “a manina”, ma non è cambiato nulla comunque) e magari spiegarmi come attuare una possibile soluzione. Altrimenti dimmi direttamente di no e fine.
Ma non ho voglia di essere preso in giro.
Grazie
-
15 Giugno 2011 alle 8:24 #85465SteveAglAmministratore del forum
consiglierei uan tisana rilassante.. se no devo chiudere la discussione… il rpoblema che poni è complesso più che suggerimenti generali e tentaitvi che presuppongono un minimo di conoscenza dei propri sistemi non è possibile, occorrerebbe avere pieno accesso al tuo sistema a à¬e dedicarci magari ore per capire… capira che un foru non può fornire questo genere di servizio… disattivare tutti i plugin, mettere il tema base è il primo passo per analizzare come si comporta il blog poi si attivano i plugin uno ad uno e magari se ne identifica uno col problema che ne so un generatore di sitemap che genera la sitemap di migliaia di pagine.. o iqualche plugin che si attiva col cron di WP e carica il sistema… difficile dirlo senza analisi approfonditi le prove da fare te le ho dette…
-
15 Giugno 2011 alle 13:56 #85482niccolotapparoPartecipante
Ad occhio il colpevole potrebbe essere similar post. Ho visto molti blog avere sporadici errori 500 causati da plugin di post correlati (come related posts, yarpp), che lanciano saltuariamente delle query ammazza database.
-
15 Giugno 2011 alle 15:21 #85494niccolotapparoPartecipante
Oltretutto quel plugin è compatibile fino a wp 2.6.2! se usi plugin incompatibili da anni, è normale che ci siano casini…
-
15 Giugno 2011 alle 15:30 #85496zhenyaPartecipante
..Il primo colpevole rimane sempre chi amministra un sito creato con WordPress..
Quando scrivo dei suggerimenti immagino che io abbia a parlare con qualcuno che almeno sa un minimo di cose riguardo WordPress. File come il wp-config.php ed .htaccess dovrebbero essere a “conoscenza” di chiunque manovra da dietro le quinte di un server, tanto più se si sta su un Vps e si usa cPanel. Se i suggerimenti sono troppo generici o poco comprensibili basta chiedere ancora; se, invece, mi devo prendere un cazziatone, dopo che tento di dare una mano.. Beh, allora dico: Il problema è il tuo e non il mio. E non ci metto più bocca.
@edit
Comunque sia, per i posteri, che magari si ritroveranno con problemi simili:
Aver messo un plugin per il robots.txt non significa aver precluso la navigazione a chi se ne infischia delle regole scritte in quel file; quindi in .htaccess aggiungerei dove finiscono le regole di WordPress:
# disable directory browsing
Options All -Indexes
Se vedi che hai molte immagini linkate da altri domini molto trafficati (i log del server servono anche a questo), allora usi:
# prevent hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www.)?iltuodominio.com(/.*)*$ [NC]
RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !bing. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .(gif|jpe?g|png|js|css)$ - [F]
Eventualmente aggiungi
RewriteCond %{HTTP_REFERER} !laurldelservizio. [NC]
per altri siti che desideri possano usare le tue immagini (sostituire “laurldelservizio” con il nome del dominio).
[F] sta per forbidden, la lista del tipo di file puoi aumentarla a piacere; dipende dai log del tuo server cosa dicono al proposito..
Nel caso specifico di questo 3ad verificherei tutte le immagini che non abbiano dimensioni assurde (sono a 72dpi?) visto che con il php uno dei problemi di memoria nasce proprio da immagini caricate senza pensarci..
Installerei, sempre non ci sia già , una cache di php nel server, come ad esempio Opcode Xcache.
Disattiverei anche il debug del plugin w3tc che “di certo” è famelico di RAM ed aggiungerei nel robots.txt:
# Limit Yahoo Slurp
User-agent: Slurp
Crawl-delay: 100
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.