Closed nishantnath closed 3 years ago
@nishantnath thanks for raising this issue. We will investigate and reply here.
@nishantnath per code https://github.com/BingAds/BingAds-Python-SDK/blob/master/bingads/service_client.py#L35 cache should be write to /tmp/suds/{userid} folder, could you please confirm?
Files being written to /tmp/suds/{userid}: suds-*-wsdl.px
Files being written to /tmp/suds: suds-*-document.px
@nishantnath would something like this work for you?
import shutil
from os import path
from tempfile import gettempdir
import atexit
def remove_suds_cache(remove_suds_cache=False):
if remove_suds_cache:
shutil.rmtree(path.join(gettempdir(), 'suds'), ignore_errors=True)
pass
# Set remove_suds_cache=True to remove the temp suds cache
atexit.register(remove_suds_cache, remove_suds_cache=False)
Currently by default cache removal is not enabled. Of course remove_suds_cache could be modified as needed.
@qitia FYI
The googleads library recently switched from the deprecated suds
to zeep
thanks @wesleybowman, we are also evaluating it.
There's also now a community supported suds version of suds-jurko https://github.com/suds-community/ (which I'm helping to maintain). Happy to accept PRs there to help with this!
And to clarify the patch mentioned on the original bugzilla link is already applied and released to the released version of suds-community.
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=978696#c19
Is there a way to avoid suds altogether? I just had an incident of cache-poisoning with 100GB+ of *.px files in /tmp/suds/ directory leading to disk crash