# Bug OP-17051 - SystemStackError on api/v3/projects with larger pageSize (e.g. 1000)

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-17051

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 15.5.1 |
| Observed in versions |  |
| Sprint | 15.5.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Markus Kahl |
| Accountable |  |
| Product manager |  |
| Developers | Jens Ulferts |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Have a larger number of projects (&gt;= 1000)
    
2.  Call the API v3 with `api/v3/projects?pageSize=1000`
    

### What is the buggy behavior?

*   A 500 is returned
    

### What is the expected behavior?

1.  Projects returned successfully.
    

### **Logs**

[https://appsignal.com/openproject-gmbh/sites/63237184d2a5e463ef717e6e/exceptions/incidents/2067](https://appsignal.com/openproject-gmbh/sites/63237184d2a5e463ef717e6e/exceptions/incidents/2067)

```text
lib/api/v3/projects/project_eager_loading_wrapper.rb:57 API::V3::Projects::ProjectEagerLoadingWrapper.ancestor_projects
lib/api/v3/projects/project_eager_loading_wrapper.rb:43 API::V3::Projects::ProjectEagerLoadingWrapper.wrap
lib/api/v3/projects/project_collection_representer.rb:70 API::V3::Projects::ProjectCollectionRepresenter#paged_models
lib/api/decorators/offset_paginated_collection.rb:46 API::Decorators::OffsetPaginatedCollection#initialize
lib/api/v3/utilities/endpoints/sql_fallbacked_index.rb:46 Class#new
lib/api/v3/utilities/endpoints/sql_fallbacked_index.rb:46 API::V3::Utilities::Endpoints::SqlFallbackedIndex#render_paginated_success
lib/api/v3/utilities/endpoints/index.rb:83 API::V3::Utilities::Endpoints::Index#render_success
lib/api/v3/utilities/endpoints/index.rb:62 API::V3::Utilities::Endpoints::Index#render
lib/api/v3/utilities/endpoints/index.rb:50 block in mount
```
