<div dir="ltr">yes Nilay, downloading in excel format works fine. It's just the CSV, and I've seen it happen just in a particular vtiger instance hosted at SiteGround.<div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Saludos<div><br></div><div>Rubén</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 23, 2021 at 8:35 AM nilay khatri <<a href="mailto:nilay.spartan@gmail.com">nilay.spartan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Ruben, when you download report in excel format, are you able to open the file properly?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 23, 2021 at 10:04 AM Uma S <<a href="mailto:uma.s@vtiger.com" target="_blank">uma.s@vtiger.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Nilay, Martin & Ruben,<div><br></div><div>Thanks! you all for deep insights on this issue.</div><div><br></div><div>I am reporting an <a href="https://code.vtiger.com/vtiger/vtigercrm/issues/1632" target="_blank">issue</a> to capture all details and it's useful for further conversation, We will brainstorm on this and get it addressed in our pipeline.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 22, 2021 at 10:37 PM nilay khatri <<a href="mailto:nilay.spartan@gmail.com" target="_blank">nilay.spartan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div dir="auto">Usually that’s the case with excel, some where extra line and that breaks the output. Not sure what would be the case for CSV here then.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, 22 Jul 2021 at 9:45 PM, Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com" target="_blank">rulotec1@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for your reply Nilay and Martin<div><br></div><div>I think in my case it's not related to the size of the file or the available memory. It's just a few records as in Martin's case.</div><div>It seems that such an error can come up when there's a mismatch between the reported size in the http headers and the actual size of the file. But I'm not sure that's the problem in this case. This particular vtiger instance is hosted at SiteGround. I was wondering whether it's a nginx configuration thing.</div><div>The weirdest thing is that when I turn on warnings, the file then downloads correctly but with this warning at the top of the file:</div><div><br></div><div><b>Warning</b>:  Declaration of Reports_ExportReport_View::preProcess(Vtiger_Request $request) should be compatible with Vtiger_View_Controller::preProcess(Vtiger_Request $request,  $display = true) in <b>/home/customer/www/<a href="http://crm.jocasasegurosyfianzas.com/public_html/modules/Reports/views/ExportReport.php" target="_blank">crm.jocasasegurosyfianzas.com/public_html/modules/Reports/views/ExportReport.php</a></b> on line <b>0</b><br /><br><div><br></div><div>Saludos<br></div><div><div><div dir="ltr"><div dir="ltr"><div><br></div><div>Rubén</div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 22, 2021 at 3:04 AM Martin Allen <<a href="mailto:martin.allen@exe-squared.co.uk" target="_blank">martin.allen@exe-squared.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB">
<div>
<p class="MsoNormal"><span>We are seeing the same issue when exporting a CSV report – which only contains 22 records  with a single query (that does not involve any permissions) and PHP has 512mb memory limit….again exporting
 as Excel works fine…<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a> <<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a>>
<b>On Behalf Of </b>nilay khatri<br>
<b>Sent:</b> 22 July 2021 07:23<br>
<b>To:</b> Vtiger Developers List <<a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a>><br>
<b>Subject:</b> Re: [Vtigercrm-developers] "Failed - Network error" when downloading report in CSV format<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">@Ruben, also increase memory limit if you are exporting in CSV format.<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jul 22, 2021 at 11:46 AM nilay khatri <<a href="mailto:nilay.spartan@gmail.com" target="_blank">nilay.spartan@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">One more thing, the CSV output generation is not optimized, you can not store the entire resultset into an array and then pipe to a CSV file.<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jul 22, 2021 at 11:43 AM nilay khatri <<a href="mailto:nilay.spartan@gmail.com" target="_blank">nilay.spartan@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Uma, for this you really need to test Vtiger with a large data set where scalability becomes an issue. There are many issues similar to this, which can not be addressed with the current architecture of Vtiger. I am eager to hear that I
 am wrong.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">- Mass edits<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Report export<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Export from List<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Imports<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">When you work with a large data set, there is no foolproof/predictable way to scale. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For example, this given case of report export. Suppose we had put conditions which involve full scan and is a non-admin with sharing rules etc, the query becomes really complex and can easily go for more than 5-10 minutes (even for small
 data sets, let us say 30-40K records as well). <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Generally php time limits are set to less than 1 min. But anyways you can predefine what could be the time required to execute the various queries. So you might have to leave the configuration on the higher side, which would be a workaround
 but would again fail if something needs even more resources/time. And it is not good to leave 1 GB memory and 30 min of execution time limit :)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Another challenge is that if you put your CRM behind a OSI layer 3 firewall / filtering, these normally have very short TTFB limits, usually < 100 sec. Which again terminates the request and can lead to the above situation.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">That's the same case where there are no event triggers for mass edits. As a workaround Vtiger decided to introduce bulk mode to simply skip events and limit the record selection to 500! Though there is a concept of batch event, but never
 implemented.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jul 22, 2021 at 11:08 AM Uma S <<a href="mailto:uma.s@vtiger.com" target="_blank">uma.s@vtiger.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Hi Ruben,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I validated this case of Export CSV in Reports, which works perfectly fine.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can you please be more precise on the case scenario, Did you notice any errors logs and what is the size of your report? I mean the number of records?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jul 22, 2021 at 8:25 AM Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com" target="_blank">rulotec1@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">I'm having and issue where downloading any report in CSV format gives this error:<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><img border="0" src="cid:17acef7731f4cff311" style="width: 287px; max-width: 100%;"><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It doesn't happen when using Excel format.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It happened in vtiger 7.0.1 and still happens after upgrading to 7.4<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Any ideas?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Saludos<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Rubén<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">With<br>
Best Regards<br>
Uma.S<u></u><u></u></p>
<div>
<p class="MsoNormal">Vtiger Team<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><u></u><u></u></p>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>

_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>