New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A connection problem occured #736

Open
Sogl opened this Issue Feb 16, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Sogl
Contributor

Sogl commented Feb 16, 2018

Hello!

I'm trying to unload much data into XLSX file but my script stops working with error "A connection problem occured".

Found it in Connection.js file:

if (options.errorText) {
            errorText = options.errorText;
            errorMsg = options.errorText;
        } else if (r && r.exception) {
            errorMsg = '<pre>'+r.exception.join('\n')+'</pre>';
            errorMsgTitle = 'PHP Exception';
        } else if (r && r.error) {
            errorMsg = r.error;
            errorMsgTitle = 'PHP Exception';
        } else {
            errorMsg = trlKwf("A connection problem occured.");
            errorText = null;
        }

I also tried these line in php without success:

Kwf_Util_MemoryLimit::set(768);
set_time_limit(600); // 10 minutes

How to increase connection time?
Chrome Network screen:
tg_image_2627504838

KWF v. 3.9

@nsams pls help 😉

@Sogl

This comment has been minimized.

Contributor

Sogl commented Feb 18, 2018

Ok, I found how to increase this thing, need to set timeout to Ajax request:

Ext2.Ajax.request({
    url: controllerUrl + '/my-controller-func',
    params: Ext2.apply(baseParams, form.getForm().getValues()),
    timeout: 600000, // 10 minutes

But this line (adds +1 line to excel file) freeze my unloading more than 3 minutes:

$firstSheet->insertNewRowBefore($rowNumber + 1, 1);
@nsams

This comment has been minimized.

Member

nsams commented Feb 20, 2018

Yes, that is the correct fix, ajax requests timeout after 30 seconds by default.

Now why the request is that slow is a completely different topic, depending on what the action does. I would try reproducing the issue with phpexcel (or whatever you use) only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment