- Posts: 3
- Thank you received: 1
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
- Topic Author
- Offline
- New Member
Less
More
6 years 10 months ago - 6 years 10 months ago #155931
by ic_limesurvey
Problem importing survey LSS - LS returns failed to open stream error was created 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.
- 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 10 months ago by DenisChenu. Reason: example.com usage
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13684
- Thank you received: 2497
6 years 10 months ago - 6 years 10 months ago #155944
by DenisChenu
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.
Replied by DenisChenu on 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
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 10 months ago by DenisChenu.
The topic has been locked.
- ic_limesurvey
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
6 years 10 months ago #156037
by ic_limesurvey
Replied by ic_limesurvey on 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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13684
- Thank you received: 2497
6 years 10 months ago #156041
by DenisChenu
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.
Replied by DenisChenu on 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 …
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
6 years 10 months ago #156095
by ic_limesurvey
Replied by ic_limesurvey on 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.
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.
- NeoES1um
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
6 years 8 months ago - 6 years 8 months ago #157683
by NeoES1um
Replied by NeoES1um on 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?
Gclub Gclub Gclub Gclub บาคาร่า Gclub บาคาร่า Gclub บาคาร่า Gclub สูตรบาคาร่า สูตรบาคาร่า gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub casino gclub casino gclub]casino gclub casino
Gclub Gclub Gclub Gclub บาคาร่า Gclub บาคาร่า Gclub บาคาร่า Gclub สูตรบาคาร่า สูตรบาคาร่า gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub ผ่านเว็บ gclub casino gclub casino gclub]casino gclub casino
Last edit: 6 years 8 months ago by NeoES1um.
The topic has been locked.