'Intermittent unauthorized Django API requests when using tokens

I am using tokens for Django rest API authentication. I noticed that in the logs, from time to time, there are unauthorized requests. The user that the token created for is set to be superuser, and other requests are successful, so it shouldn't be the problem of the token/permission. Is there some kind of connection pool limit or anything that would cause such unauthorized problem but then recover quickly?

I am using 'rest_framework' and 'rest_framework.authtoken'.

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.TokenAuthentication',
        'rest_framework.authentication.SessionAuthentication',
    ),
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.IsAuthenticated',
    ],
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source