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

SET Data fails fot large amount of data in case of single $firebase object #55

Open
barbax opened this issue Oct 8, 2016 · 0 comments

Comments

@barbax
Copy link

barbax commented Oct 8, 2016

We are testing $firebase->set() for a large amount of data.
The scenario could be replicated in php with this snippet:

$firebase = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN);
foreach($bigamountofdata as $data){
$firebase->set($my_url, $data);
}

When the amount of data is very big and cycle iterate after some seconds the $firebase->set() will fail. It will return a 502 Bad Gateway response in the firt place and then CURL will stop working with this error:
Call to URLFetch failed with application error 1 (URL using bad/illegal format or missing URL) for url MY_URL.

To fix this we edited our code this way:

foreach($bigamountofdata as $data){
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN);
$firebase->set($my_url, $data);
}

Is this the expected behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant