# Kibana Generate PDF function Returns Internal Server Error

**URL:** <https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455>\
**Category:** Kibana\
**Tags:** elastic-stack-reporting\
**Created:** [January 5, 2024, 11:32am UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455 "2024-01-05T11:32:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbathann](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mbathann](https://discuss.elastic.co/u/mbathann)\
**Post date:** [January 5, 2024, 11:32am UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455/1 "2024-01-05T11:32:46Z")

</div>

Hi Guys,

Kindly assist I have encountered an issue with KIbana, when i try to generate PDF reports, it returns internal Server error, please see error log message below, I'm new to elastic.

Kibana reporting error ":["error","plugins","reporting"],"pid":6376,"message":"{ Error: [validation\_exception] Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [3000]/[3000] maximum shards open

Many Thanks  
NJabulo

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 5, 2024, 11:50am UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455/2 "2024-01-05T11:50:08Z")

</div>

Hi @mbathann,

Welcome to the community! Which version of Elasticsearch and Kibana are you using?

It looks like your cluster has too many shards and you're hitting the limit. Can you check the size of your shards using the [`_cluster/stats` API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html). I would also consider using the [`_shrink` API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html) as per [this old thread](https://discuss.elastic.co/t/validation-failed-1-this-action-would-add-2-total-shards-but-this-cluster-currently-has-2000-2000-maximum-shards-open/257064).

Hope that helps!

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 5, 2024, 4:21pm UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455/3 "2024-01-05T16:21:06Z")

</div>

> [@mbathann](#):
>
> Hi Guys,
> 
> Kindly assist I have encountered an issue with KIbana, when i try to generate PDF reports, it returns internal Server error, please see error log message below, I'm new to elastic.
> 
> Kibana reporting error ":["error","plugins","reporting"],"pid":6376,"message":"{ Error: [validation\_exception] Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [3000]/[3000] maximum shards open
> 
> Many Thanks  
> NJabulo

Hi,

You can increase the maximum number of open shards in your cluster by updating the cluster.max\_shards\_per\_node setting. However, be aware that having too many shards can lead to performance issues, so it's important to find a balance that works for your specific use case.

Regards

---

<div class="post-metadata">

**Author:** ![mbathann](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mbathann](https://discuss.elastic.co/u/mbathann)\
**Post date:** [January 8, 2024, 10:03am UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455/4 "2024-01-08T10:03:48Z")

</div>

Hi @carly.richmond and @yago82

Thank you for your response, I'm using kibana-7.10.1, I will try out what you guys have sugessted.

Many Thanks  
Njabulo Mbatha

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 5, 2024, 10:04am UTC](https://discuss.elastic.co/t/kibana-generate-pdf-function-returns-internal-server-error/350455/5 "2024-02-05T10:04:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
