Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving to Request.prof_file raises DataError for paths longer than 251 characters #201

Open
smcoll opened this issue Jul 31, 2017 · 4 comments

Comments

@smcoll
Copy link
Contributor

smcoll commented Jul 31, 2017

The decorator is raising a DataError when it tries to store the path of a .prof for any path greater than 251 characters, since the Request.prof_file is 100 300 characters by default, and the filename itself is 41 or 49 characters.

django.db.utils.DataError: value too long for type character varying(300)

In my case, the project path for local development was more than 60 characters at a time the column was 100 chars, which meant the file was saving to disk, but no profile data was being saved to the database. We probably want to at least save the other profile data and log an error, otherwise a long file path breaks profiling altogether.

@avelis
Copy link
Collaborator

avelis commented Jul 31, 2017

@smcoll If my memory serves me correct I think you can specify a path to store the .prof files.

One suggestion is to create an symbolic link in your environment to get around the 100 character limit.

@smcoll
Copy link
Contributor Author

smcoll commented Jul 31, 2017

@avelis that will do for now, but it'd be reasonable to increase the column length, right? i'm making a PR now.

@smcoll smcoll changed the title Saving to Request.prof_file raises DataError for paths longer than 59 characters Saving to Request.prof_file raises DataError for paths longer than 51 characters Aug 1, 2017
@smcoll smcoll changed the title Saving to Request.prof_file raises DataError for paths longer than 51 characters Saving to Request.prof_file raises DataError for paths longer than 251 characters Aug 1, 2017
@srinivasreddy
Copy link

this issue can be closed since #203 is merged

@smcoll
Copy link
Contributor Author

smcoll commented Aug 7, 2017

@srinivasreddy no, #203 increased the limit by 200 characters, but the underlying issue is still the same. It needs to be determined how silk will handle a case where a binary cannot be saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants