Windows Live Writer Errors out on posting. Invalid Server Response.
We all know that I love me some Windows Live Writer. It is my blog editor of choice. Armed with that and Jing I document, screenshot and post the hell out of stuff over here and on http://www.makeUseOf.com. Today I was taking some screenshots of a new website I will be reviewing called http://www.doodlerBlog.com. Long story short…. My WLW was returning the following error every damn time I tried to post my draft. I tried posting it to several other Wordpress Sites and I had the same flucking problem!
I found out I could view the log file by going to Help – About Windows Live Writer – and View Log.
Once there I found this log:
WindowsLiveWriter,2944,None,00021,01-Jun-2009 12:48:15.973,"Exception parsing XML-RPC response:
WindowsLive.Writer.CoreServices.XmlRpcClientInvalidResponseException: Invalid response document returned from XmlRpc server —> System.Xml.XmlException: There are multiple root elements. Line 2, position 2.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
— End of inner exception stack trace —
at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
at WindowsLive.Writer.CoreServices.XmlRpcClient.CallMethod(String methodName, XmlRpcValue[] parameters)
<br />
<b>Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 886081 bytes) in <b>/usr/www/users/esengul/makeuseof.com/wp-includes/class-IXR.php</b> on line <b>207</b><br />
",""
WindowsLiveWriter,2944,Fail,00022,01-Jun-2009 12:48:16.004,"WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response – The response to the metaWeblog.newMediaObject method received from the blog server was invalid:
Invalid response document returned from XmlRpc server
at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.DoBeforePublishUploadWork(IFileUploadContext uploadContext)
at WindowsLive.Writer.PostEditor.WeblogBlogFileUploader.DoUploadWorkBeforePublish(IFileUploadContext uploadContext)"," at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
at System.Diagnostics.TraceInternal.Fail(String message)
at System.Diagnostics.Trace.Fail(String message)
at WindowsLive.Writer.PostEditor.WeblogBlogFileUploader.DoUploadWorkBeforePublish(IFileUploadContext uploadContext)
at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.FileUploadWorker.DoUploadWork(String fileReference, BlogFileUploader fileUploader, Boolean isWindowsLiveLightboxCloneEnabled)
at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.LocalFileTransformer.Transform(BeginTag tag, String reference)
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.LocalFileReferenceFixupFilter.FixReferences(BeginTag tag, String reference)
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.OnBeginTag(BeginTag tag)
at WindowsLive.Writer.CoreServices.LightWeightHTMLDocumentIterator.Parse()
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixLocalFileReferences(String html, ReferenceFixer fixer)
at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.LocalSupportingFileUploader.UploadFilesBeforePublish()
at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()
at WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()"
Out of Memory? Fatal error? What’s going on here why would my post need 33554432 bytes + another 886081 bytes? That is for you non-cis or math majors 32.8450 megabytes!
I checked it out and Jing was saving my screenshots as HUGE files! Each of my images were several Megabytes! I corrected my images – re-uploaded and BAM! We were straight.


June 1, 2009 - 12:15 pm
The out of memory error you noticed was what the server reported back for the WLW post request. PHP sets specific memory limits for processes, sounds like the server you were talking to was set to 32MB. While your image probably wasn’t that big, the encoding used to send the image to WordPress increases the memory requirement, which pushed it over the limit.
At any rate, if you run into this the future and can’t reduce the size of the file, you’ll need to increase the PHP memory limits on the server.
Click to Reply to This Comment.
Karl Gechlik Reply:
June 2nd, 2009 at 6:36 am
Thanks for the information. It sounds like you know alot about Wordpress! Maybe you have some ideas on how to modify a high traffic wordpress site to be a little more stable/available?
Click to Reply to This Comment.
June 2, 2009 - 10:57 am
The simple answer is caching. There are plugins to enable WordPress to store data in memcache and another plugin to store/serve rendered pages in memcache (batcache), which helps a lot.
Object cache:
http://ryan.wordpress.com/2005/12/23/memcached-backend/
http://svn.wp-plugins.org/memcached/trunk/object-cache.php
Batcache:
http://wordpress.org/extend/plugins/batcache/
We use both of these on WordPress.com and it helps reduce the number of servers need to serve lots of traffic.
Click to Reply to This Comment.
Karl L. Gechlik | AskTheAdmin.com Reply:
June 2nd, 2009 at 11:31 am
I have implemented PhpSpeedy and Wp-Super Cache (not on AtA on another site MakeUseOf.com) and they have helped alot do you think your combination is better Joesph? Do you work for Wordpress?
Click to Reply to This Comment.
June 3, 2009 - 9:17 am
I’m not familiar with PhpSpeedy, Super Cache is good as long as you only have one web server. If you have more than one web server then moving to memcached (which allows for caching over the network instead of just to local disk) is a good move.
I work for Automattic, which runs WordPress.com (among other things).
Click to Reply to This Comment.
Karl L. Gechlik | AskTheAdmin.com Reply:
June 3rd, 2009 at 10:29 am
Awesome thanks for the information and stopping by. If you are ever interested in guest writing for us let me know and I will set you up.
Click to Reply to This Comment.