# Upgrading GAE OAuth Server

**URL:** <https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832>\
**Category:** News\
**Created:** [January 3, 2025, 2:53pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832 "2025-01-03T14:53:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 3, 2025, 2:53pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/1 "2025-01-03T14:53:20Z")

</div>

On January 13th 2025 we will update the OAuth service running in Google App Engine.

The current version is running a deprecated Python 2.7 and the upgrade is going to be with Python 3. We have tested as much as possible that this update will not cause any problems. Unfortunately, since Python 2.7 is deprecated, we will not be able to roll back the changes.

**Update** : As of 2025-01-14 10:00 UTC service is again running and appears stable. We continue to monitor the service.

Long-term, the plan is to migrate away from AppEngine and run a hosted version of the [OAuth server](https://docs.duplicati.com/duplicati-programs/oauth-server). Before we can make that switch smoother, we need to have the current instance running in a way where we can update it, which is not possible now.

If you would prefer to run a self-hosted version of the OAuth server, this is possible with the [OAuth server source code](https://github.com/duplicati/oauth-server) or using the [pre-built OAuth server Docker image](https://hub.docker.com/r/duplicati/oauth-server).

Affected backends:

- `box.com`
- Dropbox
- Google Cloud Storage
- Google Drive
- JottaCloud
- SharePoint v2
- OneDrive
- Microsoft Groups

If you would like to review the upgrade before it is applied, the OAuth server PR is ready:

> <https://github.com/duplicati/oauth-handler/pull/11>
>
> This pull request migrates to Python 3.
> 
> Most notable changes: 
> \- The cryptog…raphy package in Python 2, the now unmaintained \[\`pycrypto\`\](https://pypi.org/project/pycrypto/), has been replaced with the maintained drop-in replacement fork \[\`pycryptodome\`\](https://pypi.org/project/pycryptodome/). 
> \- The app engine db has been replaced by \[\`google.cloud.ndb\`\](https://pypi.org/project/google-cloud-ndb/)
> \- Memcache is still being used, but through googles compatibility layer \[\`appengine-python-standard'\](https://pypi.org/project/appengine-python-standard/)
> 
> This has been tested with test users on Box, Dropbox, Google and Jottacloud.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 13, 2025, 12:36pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/3 "2025-01-13T12:36:03Z")

</div>

Pinned globally on January 13, 2025, 12:36pm UTC



---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 13, 2025, 12:36pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/4 "2025-01-13T12:36:40Z")

</div>

Upgrade is ongoing, most requests seems to pass.  
A few requests are failing, we are investigating.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 13, 2025, 2:54pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/5 "2025-01-13T14:54:01Z")

</div>

There are some performance issues with the service currently.  
We are investigating.

---

<div class="post-metadata">

**Author:** ![Hannes3](https://forum.duplicati.com/user_avatar/forum.duplicati.com/hannes3/32/2737_2.png) [@Hannes3](https://forum.duplicati.com/u/Hannes3)\
**Post date:** [January 13, 2025, 3:37pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/6 "2025-01-13T15:37:00Z")

</div>

Is version 2.1.0.106\_canary using the new OAuth?  
My back-up to OneDrive failed several times.  
After several restarts it is working fine!

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 13, 2025, 4:17pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/7 "2025-01-13T16:17:26Z")

</div>

> [@Hannes3](#):
>
> Is version 2.1.0.106\_canary using the new OAuth?

Yes, all versions of Duplicati is using the same OAuth on Google App Engine, unless you specify a different server.

There were a few periods of 500 errors due to scaling issues.  
It looks like it is _mostly_ now, but using 10x the resources from before.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 13, 2025, 4:18pm UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/8 "2025-01-13T16:18:11Z")

</div>

Pinned globally on January 13, 2025, 4:18pm UTC



---

<div class="post-metadata">

**Author:** ![DCinME](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@DCinME](https://forum.duplicati.com/u/DCinME)\
**Post date:** [January 14, 2025, 1:51am UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/9 "2025-01-14T01:51:52Z")

</div>

As you indicated, one of my backup jobs this evening failed with a 500 error. Re-ran the job and it worked fine the second time.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 14, 2025, 10:36am UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/10 "2025-01-14T10:36:39Z")

</div>

Pinned globally on January 14, 2025, 10:36am UTC



---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 14, 2025, 10:40am UTC](https://forum.duplicati.com/t/upgrading-gae-oauth-server/19832/11 "2025-01-14T10:40:45Z")

</div>

Service is now running stable having requests served with less than 100ms average response time.

> [@DCinME](#):
>
> As you indicated, one of my backup jobs this evening failed with a 500 error

It was a scaling issue caused by an extremely slow fallback in PyCrypto causing requests to take up to 8 seconds to complete.

During peak times this would exhaust all resources and return a 500 error to unlucky callers. Now the issue is fixed and resource usage is back to what it was before the upgrade and there is ample room to scale in case of large request peaks.
