Hi Ray, Just to keep you updated - I was using jxl-2.6.3.jar for excel integration in my application. This Jar contained a log4j.xml properties file which affected adwords API log4j definitions as well and so logged all API call causing the log file to grow rapidly. By deleting the log4j.,xml from this jar the problem is solved for me.
Thanks On Thursday, January 16, 2014 1:52:11 AM UTC+2, Ray Tsang (AdWords API Team) wrote: > > Assaf, > > The log is usually configured through log4j. You will need to turn off > debug logging (or turn it off for specific packages). The exact > configuration depends on your environment, however. You can start with > AdWords > API Java Client > README<https://github.com/googleads/googleads-java-lib#how-do-i-enable-logging>or > Tomcat's > Log4j usage<http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j> > . > > Heap usage tend to grow over time due to the fact that garbage collection > may not be occuring and/or aggressive. If you force a GC, you should see > the heap usage reduced. > > However, if you see that there are heap usages that grows over time > permanently and cannot be garbage collected then it may indicate a real > issue. > > Lastly - it's always recommended to tune your JVM garbage collector > specific for your application. > > Thanks! > > -- > Ray Tsang (AdWords API Advisor) > > > On Monday, January 13, 2014 10:06:35 AM UTC-5, assaf wrote: >> >> Regarding to the storage issue- >> >> I see a text log file called jxl is created is it grows very very quickly. >> The contents are something like - >> >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.utils.NSStack - NSPop >> (32) >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.message.SAXOutputter - >> SAXOutputter.startElement [' >> https://adwords.google.com/api/adwords/cm/v201309' Criterion.Type] >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.i18n.ProjectResourceBundle - >> org.apache.axis.i18n.resource::handleGetObject(startElem00) >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.encoding.SerializationContext - Start element [ >> https://adwords.google.com/api/adwords/cm/v201309]:Criterion.Type >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.utils.NSStack - NSPush >> (32) >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.message.SAXOutputter - >> SAXOutputter.characters ['Keyword'] >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.message.SAXOutputter - >> SAXOutputter.endElement [' >> https://adwords.google.com/api/adwords/cm/v201309' Criterion.Type] >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.i18n.ProjectResourceBundle - >> org.apache.axis.i18n.resource::handleGetObject(endElem00) >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.encoding.SerializationContext - End element Criterion.Type >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.utils.NSStack - NSPop >> (32) >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.message.SAXOutputter - >> SAXOutputter.startElement [' >> https://adwords.google.com/api/adwords/cm/v201309' text] >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.i18n.ProjectResourceBundle - >> org.apache.axis.i18n.resource::handleGetObject(startElem00) >> 2014-01-13 15:00:33,372 [DEBUG] >> org.apache.axis.encoding.SerializationContext - Start element [ >> https://adwords.google.com/api/adwords/cm/v201309]:text >> 2014-01-13 15:00:33,372 [DEBUG] org.apache.axis.utils.NSStack - NSPush >> (32) >> >> >> How can I turn off this debug because it causes my server to fill up >> completely every day? >> >> I would appreciate an answer on the memory issue / best way for >> creating/calling session and AdwrodsServices objects.. >> >> Thanks. >> >> On Saturday, January 11, 2014 9:37:51 PM UTC+2, assaf wrote: >>> >>> Hi, >>> >>> My application calls Java API via different services ( >>> CampaignServiceInterface,CampaignCriterionServiceInterface etc),using - >>> >>> Credential oAuth2Credential = new OfflineCredentials.Builder() >>> .forApi(Api.ADWORDS) >>> .fromFile() >>> .build() >>> .generateCredential(); >>> >>> // Construct an AdWordsSession. >>> AdWordsSession session = new AdWordsSession.Builder() >>> .fromFile() >>> .withOAuth2Credential(oAuth2Credential) >>> .build(); >>> >>> session.setClientCustomerId(pClientID); >>> >>> AdWordsServices adwordsServices = new AdWordsServices(); >>> CampaignServiceInterface campaignService = adwordsServices.get(session, >>> CampaignServiceInterface.class); >>> >>> This is done every hour for several dozen clients. >>> I am using Java application running on Tomcat using API version v201309. >>> >>> What I see is 2 issues: >>> >>> 1. The Tomcat process memory consumption grows with time. >>> 2. The consumed physical memory of the C drive of the server grows very >>> quickly and uses all the free space. I can't really locate where >>> all the storage going but I suspect some kind of tmp file or log >>> file that is being written by the API. >>> Once I restart the Tomcat all the memory and storage is released. >>> >>> My questions: >>> 1. Is there a known issue with memory leaks? >>> 2. Are there better ways for using the API than how I am implementing my >>> needs? >>> >>> - >>> * Perhaps have only 1 session per client created and used every hour >>> rather than re-creating it? * >>> - *Perhaps creating the AdwordsServices object every hour is not >>> correct and I should have 1 instance for the entire application or 1 per >>> service?* >>> >>> I appreciate any feedback and help in the matter. >>> >>> Many thanks. >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.