Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

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

  • ic_limesurvey
  • ic_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 9 months ago - 6 years 9 months ago #155931 by ic_limesurvey
- 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: 6 years 9 months ago by DenisChenu. Reason: example.com usage
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago - 6 years 9 months ago #155944 by DenisChenu
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 , plugin development .
I don't answer to private message.
Last edit: 6 years 9 months ago by DenisChenu.
The topic has been locked.
  • ic_limesurvey
  • ic_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 9 months ago #156037 by ic_limesurvey
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #156041 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • ic_limesurvey
  • ic_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #156095 by ic_limesurvey
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 topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose