AnsweredAssumed Answered

ParserDropDown cant run simultaneously with API - Bug?

Question asked by Patrick Bußmann on Oct 17, 2018
Latest reply on Oct 18, 2018 by Simon Pountney-Langham

Hi SugarCRM Community,

 

I developed an import task which is updating few datas with the ParserDropDown method. - This is working.

But now this goes productive and I have an issue if this task is running and simultaneously a user uses the API via HTTP/S.

Then the user gets a error message "A request is failing that makes the application unusable. Please contact technical support.".

Then when the task finishes all other users get a error message like "Invalid Data. No valid authentication for user.".

 

So steps to reproduce.

  1. Execute task which uses the script below.
  2. Use the application while the task is running.
  3. You will be logged out

 

If you wait until the task is finished you can use SugarCRM as normal as before.

But if you do something while its running its breaking the whole system and all users will be logged off.

 

Do you have some ideas how to fix or work around this?

 

 

Code:

    $parser = new ParserDropDown();
    $params = array();
    $_REQUEST['view_package'] = 'studio';
    $params['view_package'] = 'studio';
    $_REQUEST['dropdown_lang'] = 'en';
    $params['dropdown_lang'] = 'en';
    $params['dropdown_name'] = 'myListName';
    $json = getJSONobj();
    $params['list_value'] = $json->encode([['Key', 'Value'], ['Key 2', 'Value 2'], ['Key 3', 'Value 3']]);
    $parser->saveDropDown($params);

 

But for better testing you can do a for loop with a sleep around it so that its more real like my script which reads the data from the database.

 

for($x = 0; $x < 10; $x++)
{
    // Code above
    sleep(10);
}

Error message for user who clicks. (in german)

"Error. A request is failing that makes the application unusable. Please contact technical support."

SugarCRM Error message for user who clicks while the task is running

 

Error message for a user which not click but is affected after another user clicks, too.

"Invalid Data. No valid authentication for user."

SugarCRM Error message for user which not click but is affected, too

 

 

 

We're using SugarCRM Enterprise, Version 7.6.2.1 (Build 9) on a linux machine with PHP5 and Memcache.

Outcomes