You are not logged in.

#1 2009-12-03 15:26:25

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

IOError: failed to write data

My Django instances crash with no explanation. The bad thing is that they code hasn't almost changed and they didn't crash before.


This is the error_tuentifotosapp_log from apache:

Code:

[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] mod_wsgi (pid=27879): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] mod_wsgi (pid=27879): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011

Could be the old version of memcached 1.2 be causing the problems?

Offline

 

#2 2009-12-04 14:54:34

johns
Support Engineer
From: Adamsville, Ut
Registered: 2009-10-15
Posts: 287
Website

Re: IOError: failed to write data

It may be, You can try disabling caching. Feel free to submit a support ticket if you want us to take a look at it.


John S. -- WebFaction Support
WebFaction - Smarter web hosting
http://webfaction.com - http://twitter.com/webfaction

Online

 

#3 2009-12-04 17:53:51

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

The problem is the crash occurs more or less twice a week. So I would have to disable caching for a long time to test it. If I disable caching I would harm the other users in the shared hosting.

Offline

 

#4 2009-12-05 16:50:32

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

I did executed the command grep IOError error_tuentifotosapp_log

Code:

[Mon Oct 26 19:25:19 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/cse?cx=partner-pub-4919844959307995%3Aclk3webaiv1&cof=FORID%3A11&ie=UTF-8&hq=-inurl%3Ablog+-inurl%3Aforo+-inurl%3Achat&q=siempre+hay+amigas&ad=w9&num=10&rurl=http%3A%2F%2Fwww.tuentifotos.com%2Fbusqueda%2F%3Fcx%3Dpartner-pub-4919844959307995%253Aclk3webaiv1%26cof%3DFORID%253A11%26ie%3DUTF-8%26hq%3D-inurl%253Ablog%2B-inurl%253Aforo%2B-inurl%253Achat%26q%3Dsiempre%2Bhay%2Bamigas                                                                                                                                       
[Wed Oct 28 20:30:21 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/cse?cx=partner-pub-4919844959307995%3Aclk3webaiv1&cof=FORID%3A11&ie=UTF-8&hq=-inurl%3Ablog+-inurl%3Aforo+-inurl%3Achat&q=bebe+rezando+padre+nuestro&sa=Buscar&ad=w9&num=10&rurl=http%3A%2F%2Fwww.tuentifotos.com%2Fbusqueda%2F%3Fcx%3Dpartner-pub-4919844959307995%253Aclk3webaiv1%26cof%3DFORID%253A11%26ie%3DUTF-8%26hq%3D-inurl%253Ablog%2B-inurl%253Aforo%2B-inurl%253Achat%26q%3Dbebe%2Brezando%2Bpadre%2Bnuestro%26sa%3DBuscar                                                                                             
[Fri Nov 06 23:59:48 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&cts=1257547464465&aq=1&oq=tuenti                                                                                                                           
[Fri Nov 06 23:59:48 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.cl/search?hl=es&source=hp&q=tuentifoto&btnG=Buscar+con+Google&meta=&aq=f&oq=                                                                                                                              
[Sat Nov 07 00:04:48 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 17:38:54 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 17:38:54 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/chat/                               
[Fri Nov 20 17:38:54 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?client=firefox-a&rls=org.mozilla%3Aes-ES%3Aofficial&channel=s&hl=es&source=hp&q=tuenti+fotos&meta=&btnG=Buscar+con+Google                                                                       
[Fri Nov 20 17:38:54 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 17:38:54 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 17:38:55 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?source=ig&hl=es&rlz=1G1GGLQ_ESES351&q=fotos+tuenti&meta=lr%3D                                                                                                                                   
[Fri Nov 20 17:38:55 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 17:39:10 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&aq=f&oq=&rlz=1R2GGLL_esES340                                                                                                                               
[Fri Nov 20 17:54:10 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=www.tuentifotos.com&meta=&aq=f&oq=                                                                                                                                            
[Fri Nov 20 17:57:53 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&um=1&q=foto%20tuenti&ie=UTF-8&sa=N&tab=iw&start=0                                                                                                                                         
[Fri Nov 20 17:57:53 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=fotos+para+el+tuenti&meta=&aq=f&oq=                                                                                                                                           
[Fri Nov 20 18:17:53 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://fastbrowsersearch.com/results/results.aspx?q=tuentix&c=web&s=NFAS&v=19&tid=0                                                                                                                                         
[Fri Nov 20 18:17:53 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&aq=2s&oq=tueti                                                                                                                                             
[Fri Nov 20 18:17:53 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Fri Nov 20 18:17:53 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/chat/                               
[Fri Nov 20 18:19:11 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=fotos+tuenti&meta=&aq=f&oq=                                                                                                                                                   
[Thu Dec 03 18:20:26 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&q=tuenti+fotos&meta=&aq=1&oq=tuenti                                                                                                                                                       
[Thu Dec 03 18:35:26 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&q=tuentifotos&meta=&aq=f&oq=tuentifoto                                                                                                                                                    
[Thu Dec 03 18:35:26 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?source=ig&hl=es&rlz=1G1GGLQ_ESES351&q=tuenti+fotos&meta=lr%3D&aq=1&oq=tuenti                                                                                                                    
[Thu Dec 03 18:35:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuentifotos.com&btnG=Buscar+con+Google&meta=&aq=f&oq=                                                                                                                         
[Thu Dec 03 18:35:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&rlz=1R2ADSA_esES353&aq=0s&oq=tuentif                                                                                                                       
[Thu Dec 03 18:35:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.conduit.com/Results.aspx?q=tuenti+fotos&SelfSearch=1&hl=es&ctid=CT1854633&octid=CT1854633                                                                                                                     
[Thu Dec 03 18:40:26 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.com/search?sourceid=ie7&q=tuenti&rls=com.microsoft:*:IE-SearchBox&ie=UTF-8&oe=UTF-8&rlz=1I7ACAW_esES334ES334                                                                                              
[Thu Dec 03 18:40:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&q=fotos+tuenti&meta=&aq=f&oq=
[Thu Dec 03 18:40:44 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Thu Dec 03 18:40:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&safe=off&q=tuenti+fotos&meta=&aq=f&oq=                                                                                                                                                    
[Thu Dec 03 18:40:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.bing.com/search?q=tuentifotos&FORM=MSNH84&mkt=es-es 
[Thu Dec 03 18:45:45 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Thu Dec 03 19:00:32 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?source=ig&hl=es&rlz=1G1GGLQ_ESES346&=&q=tuentifotos&btnG=Buscar+con+Google&meta=lr%3D&aq=f&oq=                                                                                                  
[Thu Dec 03 19:35:33 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?q=tuenti+fotos&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:es-ES:official&client=firefox-a                                                                                                           
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011                                                                                                                                           
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011                                                                                                                                           
[Thu Dec 03 19:35:50 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.hiyo.com/?q=www.tuentifotos.com&lang=spanish&source=003029057005011                                                                                                                                           
[Sat Dec 05 20:37:38 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/chat/                               
[Sat Dec 05 20:41:41 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=fotos++de+++amistad&meta=&aq=f&oq=                                                                                                                                            
[Sat Dec 05 20:41:41 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&um=1&q=tuenti%20fotos&ndsp=21&ie=UTF-8&sa=N&tab=iw                                                                                                                                        
[Sat Dec 05 20:41:42 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=www.tuentifotos.com&btnG=Buscar+con+Google&meta=&aq=null&oq=                                                                                                                  
[Sat Dec 05 20:41:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&aq=3&oq=tuen                                                                                                                                               
[Sat Dec 05 20:41:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/                                    
[Sat Dec 05 20:41:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&btnG=Buscar+con+Google&meta=&aq=f&oq=                                                                                                                            
[Sat Dec 05 20:41:44 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&rlz=1R2GPEA_es&q=tuentifotos.com&meta=&aq=f&oq=                                                                                                                                           
[Sat Dec 05 20:46:42 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&rlz=1T4ITVA_esMX356MX356&ei=4rQaS6LUEoGutgehzoXjAw&sa=X&oi=spell&resnum=0&ct=result&cd=1&ved=0CAYQBSgA&q=animales+riendose&spell=1                                                        
[Sat Dec 05 20:46:42 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuentifotos.com&meta=&aq=f&oq=                                                                                                                                                
[Sat Dec 05 20:46:42 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Sat Dec 05 20:46:42 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&aq=f&oq=                                                                                                                                                   
[Sat Dec 05 21:51:43 2009] [error] [client 127.0.0.1] IOError: failed to write data                                                                          
[Sat Dec 05 21:51:43 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 21:51:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=fotos+de+amor&meta=&aq=2&oq=fotos+de
[Sat Dec 05 21:51:43 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=tuenti
[Sat Dec 05 21:51:43 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 21:51:49 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=www.tuentifotos.com&meta=&aq=o&oq=
[Sat Dec 05 21:56:49 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 22:11:47 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 22:11:47 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?q=fotos%20de%20tuenti&rls=com.microsoft:es&oe=UTF-8&startIndex=&startPage=1&um=1&hl=es&ie=UTF-8&sa=N&tab=iw
[Sat Dec 05 22:11:47 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&rlz=1R2GGLL_es&aq=f&oq=
[Sat Dec 05 22:21:49 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.com/search?client=safari&rls=en&q=tuentifotos&ie=UTF-8&oe=UTF-8
[Sat Dec 05 22:21:49 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuentifotos.com&meta=&aq=1&oq=tuentifoto
[Sat Dec 05 22:21:49 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.com/search?hl=es&source=hp&q=tuentifotos&lr=&rlz=1W1AMSA_en&aq=f&oq=
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?gbv=2&hl=es&q=tuentifotos.com&meta=&aq=9&oq=tuenti
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuenti+fotos&meta=&rlz=1R2SUNA_esES351&aq=1&oq=tuenti
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=fotos+para+el+tuenti&meta=&aq=0&oq=fotos+para
[Sat Dec 05 22:26:13 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://search.conduit.com/ResultsExt.aspx?q=tuenti+fotos&SearchSource=4&ctid=CT2227882
[Sat Dec 05 22:26:49 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&rlz=1T4GGLR_esES310ES311&q=fotos+tuenti&meta=&aq=f&oq=
[Sat Dec 05 22:42:41 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?hl=es&source=hp&q=tuentifotos.com&btnG=Buscar+con+Google&meta=&aq=f&oq=
[Sat Dec 05 22:42:41 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.es/search?rlz=1C1CHNG_esES328ES328&aq=f&sourceid=chrome&ie=UTF-8&q=tuenti+fotos
[Sat Dec 05 22:42:41 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.bing.com/search?FORM=DNSAS&q=www.tuentifotos.com

They follow a very strange time pattern. Some days they dont occur and they seam to come only from search engines.

Any clues?

Offline

 

#5 2009-12-05 19:10:09

klynton
Administrator
From: Utah
Registered: 2009-08-31
Posts: 429
Website

Re: IOError: failed to write data

From all of the information I can find about this, there is very little anywhere, what may be happening is that theses sites are trying to access your site via a POST request instead of a GET REQUEST. Since most of them are from search referrers rather than your site, although there are a couple from your site, this shouldn't cause problems because the data is not actually able to be written to your application.

Offline

 

#6 2009-12-08 13:22:45

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

More strange errors:

Code:

[Sat Dec 05 15:50:49 2009] [notice] caught SIGTERM, shutting down
[Sat Dec 05 15:50:50 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Sat Dec 05 15:50:51 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Dec 07 16:12:48 2009] [warn] child process 23468 still did not exit, sending a SIGTERM
[Mon Dec 07 16:12:50 2009] [warn] child process 23468 still did not exit, sending a SIGTERM
[Mon Dec 07 16:12:52 2009] [warn] child process 23468 still did not exit, sending a SIGTERM
[Mon Dec 07 16:12:54 2009] [error] child process 23468 still did not exit, sending a SIGKILL
[Mon Dec 07 16:12:55 2009] [notice] caught SIGTERM, shutting down
[Mon Dec 07 16:13:00 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Mon Dec 07 16:13:01 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Dec 07 16:33:13 2009] [notice] caught SIGTERM, shutting down
[Mon Dec 07 16:33:15 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Mon Dec 07 16:33:16 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Dec 07 16:37:07 2009] [notice] caught SIGTERM, shutting down
[Mon Dec 07 16:37:10 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Mon Dec 07 16:37:11 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Dec 07 16:38:22 2009] [warn] child process 19683 still did not exit, sending a SIGTERM
[Mon Dec 07 16:38:24 2009] [warn] child process 19683 still did not exit, sending a SIGTERM
[Mon Dec 07 16:38:26 2009] [warn] child process 19683 still did not exit, sending a SIGTERM
[Mon Dec 07 16:38:28 2009] [error] child process 19683 still did not exit, sending a SIGKILL
[Mon Dec 07 16:38:29 2009] [notice] caught SIGTERM, shutting down
[Mon Dec 07 16:38:35 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Mon Dec 07 16:38:36 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Tue Dec 08 13:11:31 2009] [notice] caught SIGTERM, shutting down
[Tue Dec 08 13:11:38 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Tue Dec 08 13:11:39 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

Offline

 

#7 2009-12-08 17:03:34

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

My apps keeps crashing and I have to restart Apache:

Code:

[Tue Dec 08 23:11:23 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2091): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/humor/chistes/manual-supervivencia-para-zombies/
[Tue Dec 08 23:11:24 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2033): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/humor/chistes/ilusion-optica-de-barco/
[Tue Dec 08 23:11:24 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/humor/chistes/ilusion-optica-de-barco/
[Tue Dec 08 23:11:24 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/humor/chistes/manual-supervivencia-para-zombies/
[Tue Dec 08 23:11:34 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2357): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/humor/senales/no-pasaras/
[Tue Dec 08 23:11:34 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/humor/senales/no-pasaras/
[Tue Dec 08 23:11:48 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2502): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/sentimientos/seduccion/amor-caliente/
[Tue Dec 08 23:11:48 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/sentimientos/seduccion/amor-caliente/
[Tue Dec 08 23:20:32 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2502): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/chat/
[Tue Dec 08 23:20:32 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/chat/
[Tue Dec 08 23:20:32 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2502): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'.
[Tue Dec 08 23:20:32 2009] [error] [client 127.0.0.1] IOError: failed to write data
[Tue Dec 08 23:20:33 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2502): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/sentimientos/frases/no-mires-hacia-atras/
[Tue Dec 08 23:20:33 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/sentimientos/frases/no-mires-hacia-atras/
[Tue Dec 08 23:20:33 2009] [error] [client 127.0.0.1] mod_wsgi (pid=2502): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.tuentifotos.com/
[Tue Dec 08 23:20:33 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.tuentifotos.com/
[Tue Dec 08 16:32:58 2009] [notice] caught SIGTERM, shutting down
[Tue Dec 08 16:33:03 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Tue Dec 08 16:33:04 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

Offline

 

#8 2009-12-09 16:26:48

seanf
Administrator
Registered: 2008-02-01
Posts: 1899
Website

Re: IOError: failed to write data

So, are you saying that restarting Apache fixes the problem every time?

Offline

 

#9 2009-12-09 16:40:18

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

seanf wrote:

So, are you saying that restarting Apache fixes the problem every time?

Yes. Everytime I see the webpage down I have to log in and ./stop and ./start Apache.

neutral

Offline

 

#10 2009-12-09 21:48:31

zerobug
Member
From: Vancouver, Canada
Registered: 2008-12-03
Posts: 37

Re: IOError: failed to write data

An option would be to install your own memcache instance which would be the latest version (1.4.4). I'd also install (upgrade) the libevent library (1.4.13 instead of 1.3 which is currently on the servers, IIRC).  You could create a second app listening on another port and set that up as your new memcached version.  Once you got it working you'd just need to change the port number in settings.py, restart and you're using the new memcached instance.

To install the latest version follow these instructions, they worked well for me -
http://forum.webfaction.com/viewtopic.php?id=499

Check and replace in the above instructions the latest version numbers of libevent and memcached at -
http://www.monkey.org/~provos/libevent/
http://memcached.org/

HTH.

Offline

 

#11 2009-12-10 11:43:57

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

Thank you Zerobug for the clues. Maybe I try to open a ticket before and ask if there is an upgrade of memcached planned.

Btw another crash and log:

Code:

[Thu Dec 10 18:32:51 2009] [error] [client 127.0.0.1] mod_wsgi (pid=10912): Exception occurred processing WSGI script '/home/diegocerdan/webapps/tuentifotosapp/tuentifotos.wsgi'., referer: http://www.google.com.co/search?hl=es&q=tuenti+fotos&meta=&aq=2&oq=tuen
[Thu Dec 10 18:32:51 2009] [error] [client 127.0.0.1] IOError: failed to write data, referer: http://www.google.com.co/search?hl=es&q=tuenti+fotos&meta=&aq=2&oq=tuen
[Thu Dec 10 11:40:13 2009] [notice] caught SIGTERM, shutting down
[Thu Dec 10 11:40:16 2009] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations
[Thu Dec 10 11:40:17 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

Offline

 

#12 2009-12-10 12:18:33

zerobug
Member
From: Vancouver, Canada
Registered: 2008-12-03
Posts: 37

Re: IOError: failed to write data

You're welcome... also wanted to point out that the "server reached MaxClients setting" error in the wsgi log isn't really an error (should probably be classified as warning).  When I was running Apache prefork with 2 processes it would display that line in my log after the "resuming normal operations" notice each time i restarted apache, but it would work perfectly well.

Offline

 

#13 2010-01-30 07:48:47

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

zerobug wrote:

You're welcome... also wanted to point out that the "server reached MaxClients setting" error in the wsgi log isn't really an error (should probably be classified as warning).  When I was running Apache prefork with 2 processes it would display that line in my log after the "resuming normal operations" notice each time i restarted apache, but it would work perfectly well.

Thank you for your advice. I already know I don't have to care about his "error".


I shut down memcached and application continue crashing with any clues about whats happening. sad

Offline

 

#14 2010-01-30 08:04:34

David L
Administrator
Registered: 2009-04-13
Posts: 530

Re: IOError: failed to write data

Hmm, I wonder if this is solely a mod_wsgi problem.

What I would do is set up either a mod_python, gunicorn or Spawning instance of your application (I'd recommend either of the latter two, since they just require a quick 'easy_install XXX').

If your application doesn't crash on either of them, we've at least narrowed it down to mod_wsgi.

Offline

 

#15 2010-01-30 11:29:29

zerobug
Member
From: Vancouver, Canada
Registered: 2008-12-03
Posts: 37

Re: IOError: failed to write data

Are you using KeepAlive in your Apache config?  If so, try turning KeepAlive off for a while and see if that helps.

mod_python shows a more helpful message when the connection closes:
IOError: Write failed, client closed connection.

Whereas it seems that mod_wsgi just shows:
IOError: failed to write data

The error could be that your site is trying to send data and the client closes the connection prematurely (user refresh, or bots).  Looking at your Apache log file for the exact timestamp and seeing what a few of the referer strings say as well as the browse pattern of that IP address might also give more clues.

Also look in your error* Apache logs for: "closed keepalive connection" and see if timestamps match, etc.

HTH.

Update:  In fact, Googled around and found these threads (Graham Dumpleton is the guy who wrote mod_wsgi and is quite active on the Django group too):
http://groups.google.ca/group/django-us … 89e20b3c52

http://groups.google.ca/group/modwsgi/b … db0d0fdef7

Although why it crashes the site and you need to restart Apache doesn't make sense.  Looking at my own logs I got this error occasionally but it didn't bring the site down.  Perhaps post your problem on the mod_wsgi group - along with your wsgi and apache config files and versions used and someone will probably help.

Last edited by zerobug (2010-01-30 11:40:09)

Offline

 

#16 2010-01-30 11:43:12

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

zerobug wrote:

Are you using KeepAlive in your Apache config?  If so, try turning KeepAlive off for a while and see if that helps.

I have KeepAlive off. neutral


After the weeken, I will try going back to mod_python although I changed to WSGI to be more efficient.

Offline

 

#17 2010-01-30 11:46:43

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

zerobug wrote:

Although why it crashes the site and you need to restart Apache doesn't make sense.  Looking at my own logs I got this error occasionally but it didn't bring the site down.  Perhaps post your problem on the mod_wsgi group - along with your wsgi and apache config files and versions used and someone will probably help.

That are the last lines of the Apache error log but maybe they are not the cause Apache stopped working. When the website stop working I log in my account and the apache processes are still running but I have to stop & start my application to make the website work again.

Offline

 

#18 2010-01-30 12:24:37

zerobug
Member
From: Vancouver, Canada
Registered: 2008-12-03
Posts: 37

Re: IOError: failed to write data

Weird... if it works in mod_python, then try posting the problem to the mod_wsgi group.  With version 3 of mod_wsgi Graham has changed the way the 'broken' connection errors occur.  A shot in the dark but maybe that would help.

Offline

 

#19 2010-02-10 03:50:25

ranedk
Member
Registered: 2010-02-10
Posts: 1

Re: IOError: failed to write data

I was able to reproduce this problem, not on webfaction but my local machine. With mod_python the error is "IOError: Write failed, client closed connection."
My Django view returns a lot of data, if i kill the connection in the middle of the request, apache gives this error and crashes.

The client closed the connection, but the server still tries to write to the socket which is closed. This will raise SIGPIPE, which should be caught and handled, but is not and gives this error. This probably is related to the bug http://issues.apache.org/jira/browse/MODPYTHON-92

My dedicated server completely looses it and crashes regularly, my poor fix as of now is to put a script that watches it and restarts when it goes down.
anyone with elegant clean fix, please help !

regards
rane

Offline

 

#20 2010-02-10 04:35:35

David L
Administrator
Registered: 2009-04-13
Posts: 530

Re: IOError: failed to write data

Ah, so this isn't definitely not just a mod_wsgi issue. I just noticed that there is an open Django bug about this, but has sat idle for the better part of a year.

I did more research on this, but haven't seen many reports of this actually crashing Apache. The worst it seems to do is log a 500 error.

ranedk: when you're Apache crashes, do all of it's processes die too or does it just stop returning responses?

Offline

 

#21 2010-02-10 05:00:25

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

David L: In my case they stop returning responses witch is worse than crashing.

Offline

 

#22 2010-05-18 15:22:17

kenneth
Member
Registered: 2009-05-03
Posts: 4

Re: IOError: failed to write data

Hi

I'm getting this kind of error too.  Did you get any resolution to this?  Will switching to mod_python or nginx help?

K

Last edited by kenneth (2010-05-18 15:22:36)

Offline

 

#23 2010-05-19 18:12:06

DiegoCerdan
Member
Registered: 2008-07-11
Posts: 26
Website

Re: IOError: failed to write data

Hi Kenneth,

my Django applicant stop crashing so frecuently. I think it was related to heavy load and not enought Apache processes dealing with the petitions. I changed the variable ServerLimit to 7 in httpd.conf and it crash not so often.

Is your application under heavy load?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson