Max connection from same IP to same user



I have my own custom REST API, it lives outside owncloud and makes requests to the owncloud user for getting files and so on. From outside many http clients sends requests to this REST API which in its turn translate them in webdav passing to owncloud same user account.

Problem: so when i have many http clients, say they do requests in parallel (for example using threads), i see that requests go away almost in same time but owncloud responding one after another, like it has some limitation for incoming same ip same user account requests.

I wonder is there any restrictions on this in owncloud?


Hey, i don’t think that any of such limitations are built into ownCloud.

Hope u are right. Maybe problem in web server owncloud running on…

There might be an issue there. I don’t think such limitation is on purpose.

It would be really helpful if you can post a script in order to reproduce the problem.

I guess sample code will not help a lot. its just some async requests using GuzzleHttpClient

function **monitoring**() {
    return function(callable $handler) {
        return function(\Psr\Http\Message\RequestInterface $request, array $options) use ($handler) {
            $uri = $request->getUri();
            echo 'Start: '.$uri.' | '.(new DateTime())->format('H:i:s.v').'<br/>';
            return $handler($request, $options)->then(function(\Psr\Http\Message\ResponseInterface $response) use ($uri) {
                echo 'End: '.$uri.(new DateTime())->format('H:i:s.v').'<br/>';
                return $response;

$stack = \GuzzleHttp\HandlerStack::create();
$client = new \GuzzleHttp\Client(['base_uri' => 'http://some_url_to_my_api/api/v1/',
    'handler' => $stack]);

$promises = [];

    $arr = [

foreach ($arr as $uri) {
        $promises[] = $client->requestAsync('GET', $uri, $options);

    $results = \GuzzleHttp\Promise\unwrap($promises);

    $results = \GuzzleHttp\Promise\settle($promises)->wait();

    print "finished." . PHP_EOL;

And here is output:

Start: file1.jpg | 12:09:39.071
Start: file2.jpg | 12:09:39.072
Start: file3.jpg | 12:09:39.073
Start: file4.jpg | 12:09:39.074
Start: file5.jpg | 12:09:39.074
Start: file6.jpg | 12:09:39.075
Start: file7.jpg | 12:09:39.075
Start: file8.jpg | 12:09:39.076
Start: file9.jpg | 12:09:39.077
Start: file10.jpg | 12:09:39.077
Start: file11.jpg | 12:09:39.078
Start: file12.jpg | 12:09:39.079
End: file2.jpg | 12:09:40.796
End: file4.jpg | 12:09:41.178
End: file5.jpg | 12:09:42.435
End: file3.jpg | 12:09:44.209
End: file1.jpg | 12:09:44.215
End: file7.jpg | 12:09:44.217
End: file8.jpg | 12:09:44.224
End: file6.jpg | 12:09:45.259
End: file9.jpg | 12:09:45.259
End: file12.jpg | 12:09:45.259
End: file10.jpg | 12:09:45.266
End: file11.jpg | 12:09:45.268

We see that requests sending almost same time in 39 second, but returns from while 40-45 seconds
By the way all files are same just have different names

can you post some details about your setup of owncloud?
database? webserver? maybe even the webserver config - THX