Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request timeout with a Cloud Function that returns large JSON payload #261

Closed
bourquep opened this issue Feb 5, 2016 · 9 comments
Closed
Labels
type:question Support or code-level question

Comments

@bourquep
Copy link

bourquep commented Feb 5, 2016

I have a Cloud Function that returns a large JSON payload (~1 meg), and which worked fine until updating to v2.0.7, but now leads to a HTTP request timeout (30s) error.

Reverting commit 36675a9 makes it work again.

Looks like Parse._encode is doing some heavy processing on the JSON payload and is hanging my request.

bourquep referenced this issue Feb 5, 2016
This will encode all ParseObject on the correct way so they can be translated into PFObject by the IOS SDK.
@laullon
Copy link
Contributor

laullon commented Feb 5, 2016

Yes, I know...

I'm looking for other to correct the ParseObject JSON

Take a look of this bug: #112
and tha bug on parse-ha-sdk linked on it.

@gfosco
Copy link
Contributor

gfosco commented Feb 5, 2016

@bourquep Was this something which worked on hosted Parse or something new?. Maybe we could add a raw response method (if the response isn't parse objects)?

@bourquep
Copy link
Author

bourquep commented Feb 5, 2016

Yes, it was working fine on hosted Parse. I have a lot of Cloud Functions that return "custom" JSON (array of non-Parse objects), and it's always been running smoothly on hosted Parse.

I could live with a raw response method if there is no other way.

@bourquep
Copy link
Author

bourquep commented Feb 5, 2016

But if Parse._encode() is indeed doing a lot of data processing, it would probably cause request timeouts for cloud functions that return a large array of Parse objects, no? So it might be worthwhile fixing the root of the problem?

@laullon
Copy link
Contributor

laullon commented Feb 5, 2016

Can you measure the time of Parse._encode with your payload?

@bourquep
Copy link
Author

bourquep commented Feb 5, 2016

Sure! I might only have time to do it next week though.

@laullon
Copy link
Contributor

laullon commented Feb 5, 2016

@gfosco can you please take a look of this parse-community/Parse-SDK-JS#199 ?

I still think the promblem is on the parse-SDK-JS...

@gfosco
Copy link
Contributor

gfosco commented Feb 6, 2016

Any chance we can get a payload example to process, @bourquep ?

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

Going to close this.. If you can reproduce and provide more details with 2.1.3+ please create a new issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants