Problem importing survey LSS - LS returns failed to open stream error

More
3 months 5 days ago - 3 months 5 days ago #155931 by ic_limesurvey
ic_limesurvey created the topic: Problem importing survey LSS - LS returns failed to open stream error
- Using LimeSurvey Version 2.57.1+161205
- Using the Remote Control API

I've created my own process that imports a survey by loading the LSS file, sending to LimeSurvey remote control api (import_survey), then activating the tokens, then activating the survey.
It's been working fine for a long time now.

Lately I've noticed an issue with particular surveys. These are over 600k in size.
They seem to upload to LimeSurvey without a problem, but 'import_survey' fails at some point as it does not return the Survey ID (which in turn fails the activation of tokens and the survey, since there is no ID to use).
Looking in the LS admin, the Survey is there, as it gets displayed in the survey list, but the API call fails returning the error:
fopen( some.example.com/lime/admin/remotecontrol ): failed to open stream: HTTP request failed!

where 'some.example.com' is the server I'm using with LimeSurvey installed.

If I do a manual import through the LimeSurvey itself (Create a new survey --> Import), this works fine without a problem.
It's only a problem when I'm doing it as an API call.
I thought maybe it's a timing issue, so I put in a sleep of 3 seconds, but the same surveys still fail.
Last Edit: 3 months 5 days ago by DenisChenu. Reason: example.com usage

Please Log in to join the conversation.

More
3 months 5 days ago - 3 months 5 days ago #155944 by DenisChenu
DenisChenu replied the topic: Problem importing survey LSS - LS returns failed to open stream error
Maybe you can try to log to a file if you have some error ?

manual.limesurvey.org/Optional_settings#Logging_settings

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 months 5 days ago by DenisChenu.

Please Log in to join the conversation.

More
3 months 3 days ago #156037 by ic_limesurvey
ic_limesurvey replied the topic: Problem importing survey LSS - LS returns failed to open stream error
Hi, I've put in the logging options.
I'm afraid it's not very useful, as there doesn't seem to be any errors thrown by LimeSurvey when 'import_survey' is getting called.
In my own logging, I receive the error: fopen( some.example.com/lime/admin/remotecontrol ): failed to open stream: HTTP request failed!

Like I said, the survey gets created (they appear in the survey list), but the call itself fails and does not return the Survey ID (it seems to fail straight after importing the survey into LS).
These 3 surveys are 653K, 653K and 631K. I wouldn't have thought there would be any sort of size limitation?
PHP is set to accept files up to 8MB.

Please Log in to join the conversation.

More
3 months 2 days ago #156041 by DenisChenu
DenisChenu replied the topic: Problem importing survey LSS - LS returns failed to open stream error
Then ,

If the limesurvey log system didn't show the error : try to look at other server error. I have some server where error is done by the webserver BEFORE the real server …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 months 1 day ago #156095 by ic_limesurvey
ic_limesurvey replied the topic: Problem importing survey LSS - LS returns failed to open stream error
I've worked it out.
I apologise, this isn't really a LimeSurvey problem.
This is actually a timeout issue.
It seems it takes LimeSurvey more than 5 seconds to process LSS data over 600k.
I set the timeout (in the RPC Client library I'm using) to 60 seconds instead, and now the automated process works properly.
The following user(s) said Thank You: LouisGac

Please Log in to join the conversation.

More

Start now!

Just create your account and start using Limesurvey today.

Register now