Project

General

Profile

Actions

Bug #28400

closed

CPU limits cause ajax.php to end prematurly

Added by Philipp Metzler over 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2011-07-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

If you run Typo3 on an account that has a CPU limit of 9 seconds and you try to "Retrieve / Update" in the "Extension Manager" in the tab "Remote Repository" the extension manager will display the message:

No update needed!
Repository is up to date.

But if you look at the error logs you will find:

Premature end of script headers: ajax.php, referer: http://www.domain.com/typo3/mod.php?M=tools_emdop

This error should be detected an a proper error message displayed to the user.

Actions #1

Updated by Tolleiv Nietsch over 12 years ago

  • Complexity set to medium
Actions #2

Updated by Steffen Gebert over 12 years ago

  • Status changed from New to Accepted
Actions #3

Updated by Helmut Hummel over 12 years ago

  • Target version set to 4.6.0-RC1
Actions #4

Updated by Steffen Gebert over 12 years ago

I had a brief look. Problem is in em_repositorylist.js, where the call is made:

repositoryUpdate: function() {
    var m = Ext.MessageBox.wait(TYPO3.l10n.localize('msg_longwait'), TYPO3.l10n.localize('repository_update'));
    var index = TYPO3.EM.RepositoryCombo.getValue();
    if (!index) {
        return;
    }
    var record = this.repositoryStore.getAt(index - 1);
    TYPO3.EM.ExtDirect.repositoryUpdate(index, function(response) {
    ...

Somehow we would have to trigger a FlashMessage, when Ext.Direct timeout occurs. But I have no clue, how to do this.

Actions #5

Updated by Oliver Hader over 12 years ago

Steffen Gebert wrote:

I had a brief look. Problem is in em_repositorylist.js, where the call is made:

[...]

Somehow we would have to trigger a FlashMessage, when Ext.Direct timeout occurs. But I have no clue, how to do this.

Ext.Ajax provides a request exception event - however since Ext.Ajax is a singleton it needs to be defined globally - it does not have a proper scope of the specific ExtDirect request.
http://dev.sencha.com/deploy/ext-3.4.0/docs/source/Connection.html#cls-Ext.Ajax

Actions #6

Updated by Kay Strobach over 12 years ago

The following code catches all non parseable errors (timeouts included) in an extension of mine.
Also you can define a custom error message ;)

Ext.Direct.on('event',function(e,provider) {
    if(e.result) {
        if(e.result.errorMessage) {
            Ext.Msg.alert('',e.result.errorMessage);
        }
    } else {
        if(e.type == 'exception') {
            Ext.Msg.alert('Server Exception:','<div style="width:100px;overflow:auto">'+e.xhr.responseText+'</div>');
        }
    }
});
Actions #7

Updated by Xavier Perseguers over 12 years ago

  • Target version changed from 4.6.0-RC1 to 4.6.0
Actions #8

Updated by Steffen Gebert over 12 years ago

I agree that a low max_execution_time is bad, but I see no way to fix this until the release of 4.6 (and it has always been this way). So I'm unsetting target 4.6.0.

To be honest, it requires some restructuring, which I doubt would go back into 4.5 as a bug fix. But let's see, when sb. has a fix for that.

Actions #9

Updated by Xavier Perseguers over 12 years ago

  • Target version deleted (4.6.0)
Actions #10

Updated by Alexander Opitz about 12 years ago

The default max_execution_time in PHP is 30 Seconds, but EM mostly needs more, if he import the extensions.

Afterwards, the extensions.xml.gz is present and have a actually date and hash, so the import doesn't start again. You only get the message "No update needed! Repository is up to date."

So EM should ensure that it really imported all extensions.

Actions #11

Updated by Alexander Opitz about 12 years ago

The php timeout problem seems also in #17960

Actions #12

Updated by Wouter Wolters over 9 years ago

  • Status changed from Accepted to Needs Feedback
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?
We did some patches to improve the importing of extensions.

Actions #13

Updated by Benni Mack about 9 years ago

I speeded up the loading of the extension so it is 6 times faster due to better SQL commands. This was for 6.2.

Actions #14

Updated by Philipp Metzler about 9 years ago

Just tested with TYPO3 6.2.10 and a time limit of 4 seconds. It worked so this doesn't seem to be an issue anymore.

Actions #15

Updated by Wouter Wolters almost 9 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF