appstats/recording.py:498: DeprecationWarning

94 views
Skip to first unread message

J.T

unread,
Oct 6, 2011, 5:01:23 AM10/6/11
to Google App Engine
E 2011-10-06 10:01:05.834

/base/python_runtime/python_lib/versions/1/google/appengine/ext/
appstats/recording.py:498: DeprecationWarning: get_request_cpu_usage
may not always return correct values

E 2011-10-06 10:01:05.834

summary.set_processor_mcycles(quota.get_request_cpu_usage())

Klaas Pieter Annema

unread,
Oct 6, 2011, 8:05:29 AM10/6/11
to google-a...@googlegroups.com
I'm seeing the same error appear in my logs all of a sudden. It seems to happen more often in startup requests.

FastGeert

unread,
Oct 6, 2011, 8:05:22 AM10/6/11
to Google App Engine
Is this function REALLY deprecated ? The logs for my application are
also spammed with errors because of this. Though when I go looking for
updates in the documentation here
http://code.google.com/appengine/docs/quotas.html#Monitoring_CPU_Usage_in_a_Request
, I don't see any changes there !!

Please investigate as other, maybe more severe problems, are now
hidden in the thousands of error messages.

Regards,

Geert

Rishi Arora

unread,
Oct 6, 2011, 9:18:01 AM10/6/11
to google-a...@googlegroups.com
I tried tinkering around with constants in appengine_config.py, to avoid logging this error (which should really be a warning instead):

appstats_DEBUG = False
appstats_DUMP_LEVEL = -1

But this line says it is not possible:
"(Tracebacks are always logged at the ERROR level as well.)"

So, I have temporarily disabled appstats:

def webapp_add_wsgi_middleware(app):
    # from google.appengine.ext.appstats import recording
    # app = recording.appstats_wsgi_middleware(app)
    return app


On Thu, Oct 6, 2011 at 7:05 AM, Klaas Pieter Annema <klaas...@annema.me> wrote:
I'm seeing the same error appear in my logs all of a sudden. It seems to happen more often in startup requests.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/iOxIy4xLX8AJ.

To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

voscausa

unread,
Oct 6, 2011, 12:05:03 PM10/6/11
to google-a...@googlegroups.com
I have the same problem and also reported this in the Python forum.
For the moment I will disable appstats as suggested by Rishi Arora.

Jairo Vasquez

unread,
Oct 6, 2011, 1:03:42 PM10/6/11
to google-a...@googlegroups.com
Same error here

Bryce Cutt

unread,
Oct 6, 2011, 1:07:29 PM10/6/11
to Google App Engine, pro...@google.com
I am seeing these too.

I have reported it as a production issue:
http://code.google.com/p/googleappengine/issues/detail?id=6056&thanks=6056&ts=1317920588

I'll also CC Johan as this seems to be affecting lots of us and he'll
know who to forward it to.

- Bryce

Brian Quinlan

unread,
Oct 7, 2011, 7:34:02 PM10/7/11
to Google App Engine
Hi everyone,

Sorry about the trouble here.

get_request_cpu_usage is indeed deprecated and we are working on
changing appstats to not use it.

Cheers,
Brian

On Oct 7, 4:07 am, Bryce Cutt <pandas...@gmail.com> wrote:
> I am seeing these too.
>
> I have reported it as a production issue:http://code.google.com/p/googleappengine/issues/detail?id=6056&thanks...

Bryce Cutt

unread,
Nov 7, 2011, 3:12:13 PM11/7/11
to Google App Engine
Seems to be fixed today with the release of SDK 1.6.0. I just re-
enabled AppStats on the live site and am no longer seeing these errors
in the logs.

Klaas Pieter Annema

unread,
Nov 10, 2011, 3:07:48 PM11/10/11
to google-a...@googlegroups.com
I tried re-enabling it, still got the same error.
Reply all
Reply to author
Forward
0 new messages