Jump to content

xmlresponse incomplete when large xml files are generated


Greywacke

Recommended Posts

hi all,we did not foresee the large amount of lead information generated by the site, so now it seems that when in the region of 238 leads, an incomplete xml document is received by the client which breaks the xml (stops midway through an attribute, tag incomplete, no closing tags). there are no supplier or regions listed then, except the individual ones per lead.i seem to have run into a brick wall regarding the many options available to me. returning an xml including the count of leads, regions and suppliers then doing an ajax request for each lead, region and supplier.i would just like to verify wether this is correct or not.

Link to comment
Share on other sites

How much time does it take to generate this large XML? If it's generated by PHP, you're limited by the time PHP can execute, so if the generation takes more than 30 seconds or so (whatever the actual limitation is), it's normal for PHP to simply stop processing after the timeout.Also, are you using DOM or XMLWriter? If the former, you may be exsausting your server's memory by that point. You'll have to either split the large file into smaller XML files, or write it out with XMLWriter, which will keep your memory low.

Link to comment
Share on other sites

relatively quickly, it might be cos of a client side error too. the large xml requests work, only when a mail is being sent before does it take longer and exceed the timeout.it seems that a sql error occurs when the email is being sent, and it halts the script 0o so i do not get the email result or the returned sql statements and errors :/if i alert the xml returned, it cuts off most of it.eg when loading the page:

<?xml version="1.0" encoding="ISO-8859-1"?><root>	<order name="Bakkie Canopy">		<lead>			<id>1187</id>			<consumer>Herbert Stanley;herberts@sanlam4u.com.na;0811221236;Windhoek</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>products_description = Opel Corsa Canopy - Lowline<br />Bakkie model = 2004 - current model<br />Requirement = New - White<br />Colour code = Athenian White<br />Features = Brake light, Interior light<br />Budget = R5,000 to R7,500<br />Fitment = Within the next month</attribs>			<message>Canopy for opel 2010 model supplied and fitted</message>			<sent>0</sent>			<created>2010-04-10 12:53:58</created>			<service id="1" name="Bakkie Canopy" cost="20" /> />			<region id="26" name="Other - Namibia" />		</lead>		<lead>			<id>1186</id>			<consumer>Loure Van Eeden;gjvaneeden@gmail.com;0846132814;Riversdal </consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = within_month<br />vehicle_status = possession_yes<br />vehicle_make_model = Mazda - DCAB<br />year_model = 2006</attribs>			<message>&nbsp;</message>			<sent>0</sent>			<created>2010-04-10 12:30:25</created>			<service id="1" name="Bakkie Canopy" cost="20" /> />			<region id="66" name="western_cape_george" />		</lead>		<lead>			<id>1185</id>			<consumer>Roelof Van Wyk;treoscape@gmail.com;0715682526;Pretoria</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>products_description = Isuzu Ext/C Canopy - Lowline<br />Bakkie model = 2007 - current model<br />Requirement = New - Colour-coded<br />Colour code = Silver Lightning<br />Features = Brake light<br />Budget = R7,500 to R10,000<br />Fitment = ASAP</attribs>			<message>Quotations</message>			<sent>1</sent>			<created>2010-04-09 19:53:03</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" />			<region id="24" name="Gauteng - Tshwane Metro" />		</lead>		<lead>			<id>1184</id>			<consumer>C A McGrath;craigamcgrath@gmail.com;0829032477;East Rand</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R3,000 to R4,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan -  1400<br />year_model = 2000</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-09 15:15:11</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" />			<region id="62" name="gauteng_ekurhuleni" />		</lead>		<lead>			<id>1183</id>			<consumer>Hennie De Jager Or Christo;el-shaddai@absamail.co.za;082 968 7310 /0827656200;Nigel</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R3,000 to R4,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Opel - Corsa<br />year_model = 1999</attribs>			<message>Half door</message>			<sent>1</sent>			<created>2010-04-09 05:28:32</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" />			<region id="62" name="gauteng_ekurhuleni" />		</lead>		<lead>			<id>1152</id>			<consumer>Gerhard Venter;gerros@mweb.co.za;0832524268;Bloemfontein</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>products_description = Nissan Navara Canopy - Lowline<br />Bakkie model = 2005 - current model<br />Requirement = Pre-owned - White<br />Colour code = White Non-coded (standard)<br />Budget = R3,000 to R4,000<br />Fitment = Within the next 2 months</attribs>			<message>Na</message>			<sent>0</sent>			<created>2010-04-08 22:20:31</created>			<service id="1" name="Bakkie Canopy" cost="20" /> />			<region id="34" name="Free State - Bloemfontein" />		</lead>		<lead>			<id>1151</id>			<consumer>Venter;gerros@mweb.co.za;0832524268;Bloemfontein</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = highline_standard<br />budget = R3,000 to R4,000<br />fitment = within_2_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - Navara<br />year_model = 2008</attribs>			<message>&nbsp;</message>			<sent>0</sent>			<created>2010-04-08 21:51:15</created>			<service id="1" name="Bakkie Canopy" cost="20" /> />			<region id="47" name="free_state_bloem" />		</lead>		<lead>			<id>1150</id>			<consumer>Preveshy Sing;eastlink@telkomsa.net;0829087192;Ladysmith</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = highline_full_door<br />budget = R4,000 to R5,000<br />fitment = within_2_weeks<br />vehicle_status = possession_yes<br />vehicle_make_model = Opel - Corsa<br />year_model = 2008</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-08 21:25:09</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="20" name="City Canopies (Durban)" w3a="http://www.skytopcanopies.co.za/" contact="Farouk Kahn" position="Owner" mail="citycanopies@gmail.com" tel="27313683983" bal="920" />			<region id="45" name="kwazulu_natal_durban" />		</lead>		<lead>			<id>1149</id>			<consumer>Ivor Novello;velloin@gmail.com;0823305610;Phalaborwa</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R5,000 to R7,500<br />fitment = not_within_3_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Mazda - DCAB<br />year_model = 2003</attribs>			<message>&nbsp;</message>			<sent>0</sent>			<created>2010-04-08 17:52:00</created>			<service id="1" name="Bakkie Canopy" cost="20" /> />			<region id="48" name="limpopo_polokwane" />		</lead>		<lead>			<id>1148</id>			<consumer>RUDI VAN DER WAL;rudi.vdwal@absa.co.za;0829247485;Pretoria</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = low_or_highline_standard<br />budget = R3,000 to R4,000<br />fitment = not_within_3_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - DCAB<br />year_model = 2007</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-08 17:05:26</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" />			<region id="13" name="gauteng_tshwane" />		</lead>		<lead>			<id>1146</id>			<consumer>Wiedaad Noordien;wiedaad.noordien@kpmg.co.za;0832905899;Cape Town</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_no_ordered<br />vehicle_make_model = Opel - Corsa<br />year_model = 2006</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-08 14:29:50</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="7" name="Just Canopies (Cape Town)" w3a="www.servicexchange.co.za" contact="Chris Smith" position="Owner" mail="justcanopies@telkomsa.net" tel="27215566821" bal="140" />			<region id="11" name="western_cape_capetown" />		</lead>		<lead>			<id>1147</id>			<consumer>Wiedaad Noordien;wiedaad.noordien@kpmg.co.za;0832905899;Cape Town</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_no_ordered<br />vehicle_make_model = Opel - Corsa<br />year_model = 2006</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-08 14:29:50</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="8" name="Continental Canopies (Cape Town)" w3a="http://www.continentalmotors.co.za/" contact="Dries Lubbe" position="Owner" mail="johncox@live.co.za" tel="27215114787" bal="680" />			<region id="11" name="western_cape_capetown" />		</lead>		<lead>			<id>1144</id>			<consumer>Wayne;wayne.z@live.co.za;0797841683;Cape Town</consumer>			<duplicates>No Duplicates Found</duplicates>			<attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - DCAB<br />year_model = 2005</attribs>			<message>&nbsp;</message>			<sent>1</sent>			<created>2010-04-08 14:18:48</created>			<service id="1" name="Bakkie Canopy" cost="20" />			<supplier id="8" name="Continental Canopies (Cape Town)" w3a="http://www.continentalmotors.co.za/" contact="Dries Lubbe" position="Owner" ma

the longer lines have been carried over to the next line to fit the post on smaller resolutions. should i forward a lead, the response doesn't even get alerted.okay, i think only the alert buffer was filled, the response text was too big to fit in an alert (i'll have to do a div to display it in after a while). all the xml entities are parsed - this issue has been resolved.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...