[erlang-questions] xmerl troubles

Alex Shneyderman a.shneyderman@REDACTED
Sat Jun 9 23:42:11 CEST 2012

Hi, there!

I am using xmerl (via xmlrpc) and it seems to be having problems under
heavy load.

I have a system that tries to simulate load on our system. I have to
shoot a lot of little
XML RPC-like messages towards the system and parse responses from it.
Each simulation
runs in its own process. Parsing of the payload is done with xmlrpc
which in turn uses xmerl.

When load on the system is small around 250 agents, things work well.
When I up the number
pseudo-agents to around 290 xmerl starts throwing a hissy fit. A
message that is similar in
all respects but the data inside elements to the previously parsed
messages become problematic.

Code is nothing extra-ordinary and looks like this:

case xmlrpc_decode:payload(XmlStr) of
	{ok, {response, [{struct, ResponseParams}]}}->
		lager:debug("XML-RPC payload parsed:~n {response, [{struct, ~p}]}
~n", [ResponseParams]),
	{error, Reason} ->
		lager:debug("XML-RPC payload could not be parsed:~n~p~n", [Reason]),

the exception I get:

2012-06-09 23:02:25.037 [debug]
<0.1877.0>@cc_agent_utils:parse_login_response_xml:105 XML-RPC payload
could not be parsed:
2012-06-09 23:02:25.037 [debug] <0.1877.0>@cc_agent_srv:terminate:147
Terminate was called for agent '9ba8de71-6821-4b76-b2a9-c4e0d1b2ae82'
talking on local port 64001

Anyone had similar experience with xmerl? Is there any setting I can
tweak to make xmerl behave nicely?


More information about the erlang-questions mailing list