[wp-trac] [WordPress Trac] #21098: Out of memory errors in XML-RPC

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 29 09:08:16 UTC 2012


#21098: Out of memory errors in XML-RPC
---------------------------------+------------------------------
 Reporter:  koke                 |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  XML-RPC              |     Version:  3.4
 Severity:  major                |  Resolution:
 Keywords:  mobile dev-feedback  |
---------------------------------+------------------------------

Comment (by koke):

 Replying to [comment:5 maxcutler]:
 > I'm hesitant to implement anything that artificially raises the memory
 limit. On shared hosting that may just cause more problems, and those are
 the environments that are likely seeing this problem currently anyways.

 WordPress already does this in several places, mostly media and zip
 handling (just grep memory_limit)

 > If we can find some memory usage optimizations, then great. But I think
 the real answer here is that this is the client's problem to deal with. If
 any XML-RPC methods do not support paging, then that's a feature we should
 add. Also maybe expose memory_limit in wp.getOptions to let client make a
 smart decision?

 And what should a client do with memory_limit? How do I translate 32M to X
 comments or categories? I'm willing to reduce the number of items
 requested, but how do we pick that number? We didn't raise the number of
 comments requested and we hadn't heard of memory problems before 3.4

 > And clients need to be smart about the quantity of data they request.
 While multicall might result in fewer HTTP requests on a mobile device,
 it's a big load on a server and it's going to require non-trivial memory
 on the client to buffer the response and do XML de-serialization. Use
 threading or other mobile OS provisions to have multiple XML-RPC requests
 in-flight simultaneously and let the network and OS optimize that.

 I find interesting that a mobile phone can handle a data size that a
 server can't. IMO, it's a XML-RPC problem. The way we deal with big XML-
 RPC requests is by using file streaming:
 https://github.com/eczarny/xmlrpc/issues/11

 This is not a trivial change, but I think WordPress should need the same
 amount of memory to return 10 or 1000 comments

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21098#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list