# AWX job\_id integer max value 2147483647?

**URL:** <https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321>\
**Category:** Get Help\
**Tags:** awx, postgresql\
**Created:** [September 7, 2024, 7:51pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321 "2024-09-07T19:51:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [September 7, 2024, 7:51pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/1 "2024-09-07T19:51:21Z")

</div>

Hello!

I was curious about the job\_id parameter in AWX, in the postgresql database specifically. I tried to gather information on this myself and I believe I’ve arrived at the conclusion that job\_id in the main\_activitystream\_job table is an integer numeric type, and so per [PostgreSQL: Documentation: 16: 8.1.&nbsp;Numeric Types](https://www.postgresql.org/docs/current/datatype-numeric.html) the highest job\_id would be 2147483647.

If the job\_id exceeds this, does anyone know what happens at 2147483648?

I appreciate any info, thank you!

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [October 28, 2024, 3:41pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/2 "2024-10-28T15:41:35Z")

</div>

Sorry to bump this thread, but I’m just looking for confirmation on what I think is true is true.

If an AWX instance were to run out of job\_id numbers, what recourse would a poor soul have to remediate that?

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://forum.ansible.com/u/johan)\
**Post date:** [October 28, 2024, 8:21pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/3 "2024-10-28T20:21:48Z")

</div>

Just a theorical answer, as there might be some checks in AWX which might handle - or not - this situation.

That being said, postgresql whould throw an “integer out of range” error.

In theory, you could use an ‘alter table’ sql command to convert the column to bigint data type. But once again, we don’t know how AWX code woul deal with that and how existing data would be affected.

A client creating roughly 150000 jobs every month would, event at that rate, need more than 1100 years to exhaust the possible number of jobs ids. So I’m a bit afraid to ask if you think you could exhaust this range quickier ? 🙂

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [October 28, 2024, 8:28pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/4 "2024-10-28T20:28:35Z")

</div>

Nah, don’t think it’s likely, but just wanted to be sure since I see one of our instances is already around job ID 1.6 million. I’m not a huge Postgres guy, when you talk about a toast vacuum it makes me think of crumbs under the toaster in the kitchen, so I’m not exactly sure of what I’m seeing being correct. Appreciate the answer!

---

<div class="post-metadata">

**Author:** ![ads](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ads/32/747_2.png) [@ads](https://forum.ansible.com/u/ads)\
**Post date:** [October 28, 2024, 8:59pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/5 "2024-10-28T20:59:55Z")

</div>

1.6 million is around 1/1000 of the available range for an integer (which is 2^31, as it’s signed).

Rewriting the table works, and unless AWX does also query the datatype, this will be transparent. But it will lock and rewrite the entire table. Downtime for AWX included.

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [October 28, 2024, 9:06pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/6 "2024-10-28T21:06:16Z")

</div>

Hopefully I’ll be retired before 1000 years then

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 27, 2024, 9:06pm UTC](https://forum.ansible.com/t/awx-job-id-integer-max-value-2147483647/8321/7 "2024-11-27T21:06:52Z")

</div>

Closed on November 27, 2024, 9:06pm UTC

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