Home › Forum › Problemi Vari con WP › Consumi ram Worpress quando su pubblicano articoli
-
AutorePost
-
-
18 Novembre 2012 alle 15:50 #23129SantoPartecipante
Salve, sto studiando la situazione in cui mi trovo ovvero quella di consumi di ram eccessivi da parte di wordpress. Ho circa 1300 articoli, ma quando ne pubblico uno i consumi di ram schizzano.
In buona sostanza, oggi ho disattivato il Genesis Framework (non so se avete presente) e tutti i plugin.
Ho scritto e pubblicato 2 articoli:
Primo articolo
consumo massimo circa 130 m
Secondo articolo
poco più di 100m
Poi ho rimesso il Genesis ed ho pubblicato un nuovo articolo ed i valori sono saliti notevolmente:
11-18 12:42 11-18 12:43 33 100 1 6 15 43.8M 232.6M 708.0M 0 0
11-18 12:41 11-18 12:42 25 83 1 6 15 64.2M 251.9M 708.0M 0 0
Siamo dai 232 ai 251 m di picco.
Vorrei capire una cosa: in media, WordPress (snello senza plugin attivi) quanta ram consuma al momento in cui si pubblica un articolo?
Secondo voi i valori sono nella media?
Una cosa è certa: quando uso il Genesis il picco è di circa 100m superiore…
-
19 Novembre 2012 alle 11:16 #98801San PietroburgoPartecipante
Lo scenario dovrebbe essere quello classico; alla pubblicazione dell’articolo parte il ping ai servizi, questi arrivano famelici con i loro bot e WordPress si siede.. Non per colpa sua, ma è tutto dovuto al fantastico webserver Apache.
Le soluzioni sono diverse, dipende anche da che servizio si utilizza (shareserver, vps o dedicato?). La più caldeggiata sarebbe quella di passare al webserver nginx. Ma se non è possibile, allora con Apache dobbiamo armarci di pazienza; in shareserver non possiamo fare nulla, se non limitare i bot da htaccess; invece con vps o dedicato si può mettere uno script che faccia il flush della memoria, oppure il classico reboot, automaticamente e ogniqualvolta sia necessario.. Basta che lo script possa monitorarne l’utilizzo, ad esempio via API.
-
19 Novembre 2012 alle 11:44 #98806SantoPartecipante
Il mio sito è su cloudlinux. Il resto che hai scritto purtroppo non l’ho capito. Ti riferisci a dei vps e fare caching lato server?
-
19 Novembre 2012 alle 12:19 #98808San PietroburgoPartecipante
La domanda era tra le righe, ti trovi in share server (anche detto share hosting), in un virtual server oppure su di un dedicato?
-
19 Novembre 2012 alle 12:56 #98814SantoPartecipante
server.it/cloud-hosting.html piano csmcloud. Provvisoriamente, visto l’eccessivo consumo di risorse e gli errori 500 di Google, ed errori nell’error log scaricato via ftp, hanno fuso al CSM Cloud le risorse del Topcloud. Su quest’hosting ci sto dall’1 novembre, ma i problemini iniziarono col vecchio hosting, guardacaso da quando spostò il sito in un’altro server in data 11 ottobre. Lo testimonia l’error log che porta gli aeriro da quando il sito nacque.
-
19 Novembre 2012 alle 13:28 #98815San PietroburgoPartecipante
Vedo, si tratta dei nuovi servizi host col cappio al collo; superate le risorse disponibili il sito va offline, bella roba! Quando si ha un sito con molti contenuti e trafficato sarebbe bene star lontani da quelle tipologie di hosting.
L’unica cosa che puoi fare (se non desideri migrare e spendere di più) è intervenire nel file .htaccess, bannando i crawlers che non desideri ravanino le pagine.. Ovviamente ad esclusione di Google, Msn (oggi Bing) e pochi altri.
-
19 Novembre 2012 alle 14:19 #98819SantoPartecipante
Guarda so soltanto che da quando ho cambiato hosting, gli errori si sono moltiplicati ed i problemi aumentati. E’ praticamente dall’1 novembre che sto letteralmente uscendo pazzo (7 giorni su 7) al punto tale che da poche ore stavo considerando la possibilità di eliminare tutti i contenuti, reinstallare wp e ricominciare da capo. Peccato che perderei 4-5000 visite al giorno, che con tutte queste problematiche stanno scendendo progressivamente. Loro mi consigliarono:
Se fossi in lei onestamente, dopo tutti i test fatti, opterei per un vps, ma solo se avessi le conoscenze sistemistiche idonee al raggiungimento del mio scopo, e solo perchè mi sarei rassegnato al fatto che il sito abusa di risorse. Probabilmente un vps con 1gb di ram configurato a dovere le può reggere senza problemi 4-5 volte le visite che fa ora, ma sono configurazioni diversi da quelli attuabili in un ambiente condiviso, come le si diceva prima, riguardo sistemi di caching e reverse proxy avanzati.
Io ripeto, i problemi iniziarono quando il vecchio hosting (xlogic) mi spostò il sito in un nuovo server: lo stesso giorno iniziarono errori del tipo [11-Oct-2012 14:30:51 UTC] PHP Fatal error: Out of memory (allocated 27000832) (tried to allocate 122880 bytes) in /home/xxx/public_html/wp-includes/general-template.php on line 980
errori che su server.it si sono moltiplicati….
Se mi dici cosଠprendo in considerazione anche la possibilità di cambiare ancora hosting e se hai consigli a riguardo te ne sarei grato.
Era il mio primo sito “vero”, visto che fino ad un anno fa lavoravo solo su siti gratuiti, proprio perchè temevo potessero accadere cose che non avrei saputo sistemare….
Mi affidai al framework proprio per avere la vita più facile…
-
19 Novembre 2012 alle 17:34 #98826SantoPartecipante
San Pietroburgo (o chiunque altro del forum), come si fa a bannare i crawler via htaccess? E quali dovrei bannare? Grazie
L’altro giorno abbiamo scoperto con l’hoster, che alle 8 e qualcosa del mattino, il crawler di Google consuma un sacco di risorse. Mi consigliarono di abbassare la velocità di scansione via webmaster tool. Quindi ho tolto quella automatica e messo 0.01 richieste al secondo e 100 secondi tra le richieste…
-
19 Novembre 2012 alle 20:10 #98832San PietroburgoPartecipante
Se il sito ha effettivamente 4 o 5 mila visitatori giornalieri (per effettive intendo i dati di analytics di google) significa che le pagine viste possono oscillare tra le almeno 6 e le 20 mila.. Un sito web che ha questi numeri non potrà stare in nessun servizio di hosting condiviso, nemmeno quelli americani che costano di più ma offrono maggiori risorse. Ovviamente fa eccezione wpitaly, ma dietro ci sono esperti (Steve e Wolly) che hanno limato il più possibile e configurato le applicazioni per ottenere il massimo; cosa assai improbabile per i normali utilizzatori. Oltretutto nei blog creati con WordPress si fa largo uso di immagini e queste incidono molto sul consumo della memoria del server, specie quando non ottimizzate.
Nel file .htaccess esistono vari modi per bloccare crawlers indesiderati e si può scrivere questo, giusto per fare un esempio, appena prima o dopo delle regole che scrive WordPress:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (Baiduspider|altrobot|altrobot|altri ancora) [NC]
RewriteRule .* - [R=403,L]
Si dividono i vari User Agent con il carattere pipe “|” e se ne può inserire quanti necessari; come anzidetto terrei fuori dal blocco google e bing.
Altri andranno bloccati scrivendo il loro numero IP, giacché ne esistono alcuni che non hanno un vero e proprio identificativo (User Agent).
Per scovarli, come per vedere quali sono i bot che ravanano troppo il sito web, va letto il file di log del server con pazienza, specie per quegli orari in cui va in errore.
Direi anche che è inutile andare nelle impostazioni di Webmaster Tools di Google per imporgli maggior lentezza, il bot di google impara da se la velocità con cui leggere le pagine.
Aggiungo inoltre che sarebbe inutile agire dal file robots.txt, poiché i bot di alcuni servizi invadenti se ne infischiano delle regole che andiamo a suggerire con quel file.
-
20 Novembre 2012 alle 18:21 #98871SantoPartecipante
Questo codice devo aggiungerlo per intero al file htaccess?
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (Baiduspider|altrobot|altrobot|altri ancora) [NC]
RewriteRule .* – [R=403,L]
Non ho capito se basta inserire solo i nomi, ma leggo che vanno scritti anche gli indirizzi ip, ma dove?
Altri robot che potrei aggiungere senza fare danni?
Ho letto sullo spider cinese Baiduspider…e non ha una bella fama.
Purtroppo non posso accedere al file di log del server, posso solo chiedere all’hoster.
-
23 Novembre 2012 alle 22:57 #98931SantoPartecipante
Riprendo la discussione per chiedere il motivo per il quale non funziona la procedura indicatami da San Pietroburgo.
E’ una giornata che spulcio il log server del mio sito, ed ho trovato diversi bot e spider che non so come bannare.
Ho inserito in htaccess (devo aggiungere gli altri beccati in seguito):
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (Baiduspider|AhrefsBot|Yandex) [NC]
RewriteRule .* – [R=403,L]
Nel robot
# MOTORI DI RICERCA GIAPPONESI
User-agent: moget
User-agent: ichiro
Disallow: /
# MOTORI DI RICERCA KOREANI
User-agent: NaverBot
User-agent: Yeti
Disallow: /
# MOTORI DI RICERCA CINESI
User-agent: Baiduspider
User-agent: Baiduspider-video
User-agent: Baiduspider-image
User-agent: sogou spider
User-agent: YoudaoBot
Disallow: /
# MOTORI DI RICERCA RUSSI
User-agent: Yandex
Disallow: /
# ALTRI MOTORI DI RICERCA
user-agent: AhrefsBot
disallow: /
Ma i vari Baiduspider|AhrefsBot|Yandex continuano ad entrare ed a consumare risorse.
Nel log ho successivamente trovato: proximic, Sosospider, CompSpyBot, (Ezooms/1.0; ezooms.bot@gmail.com), Pixray-Seeker/2.0 (PIXRAYBOT – PIXRAY – Manage and Control Digital Image Content +crawler@pixray.com), CrystalSemanticsBot, R6_CommentReader(Radian6 Crawler FAQ), BlogPulseLive (support@blogpulse.com). Gli ultimi 2 non capisco nemmeno cosa siano, o meglio radian6 fa evidente riferimento a qualcosa che riguarda l’RSS, il secondo non lo so. Proximic sembra di Amazon, va bannato?
Come bannare tutti questi prosciuga risorse? Qualcuno può fornirmi qualche dritta? Sbaglio qualcosa?
Ho notato che Bing, Msn e Google entrano davvero tante, forse troppe volte. C’è un modo per abbassare il numero d’accessi?
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.