Detail="Deadline Exceeded", DebugException="Grpc.Core.Internal.CoreErrorDetailException

372 views
Skip to first unread message

Sadik Azami

unread,
Sep 13, 2022, 6:08:58 AM9/13/22
to Google Ads API and AdWords API Forum
Hi Team,

Getting below error for getting campaigns list-

Detail="Deadline Exceeded", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1663045617.542000000","description":"Deadline Exceeded","file":"..\..\..\src\core\ext\filters\deadline\deadline_filter.cc","file_line":81,"grpc_status":4}")

Thanks
Sadik

Sadik Azami

unread,
Sep 13, 2022, 6:26:23 AM9/13/22
to Google Ads API and AdWords API Forum
using Google.Ads.GoogleAds;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V11.Services;
using Google.Api.Gax;
using meedee8.ads.GoogleAdsApi.Helper;
using meedee8.ads.GoogleAdsApi.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace meedee8.ads.GoogleAdsApi.Campaigns
{
    public class GetCampaign : ICampaign
    {
        private const int PAGE_SIZE = 1_000;
        /// <summary>
        /// This will return the All campaign that linked to selected AdsAccount
        /// </summary>
        /// <param name="AccountID"></param>
        /// <returns>Campaign</returns>
        public List<CampaignSetting> GetCampaignDetails(string AccountID)
        {
            GoogleAdsClient client = new GoogleAdsClient();
            List<CampaignSetting> Campaign = new List<CampaignSetting>();
            GoogleAdsServiceClient googleAdsService = client.GetService(Services.V11.GoogleAdsService);
            SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
            {
                PageSize = PAGE_SIZE,
                Query = @"SELECT
                           campaign.id,
                            campaign.name,
                            campaign.status,
                            campaign.start_date,
                            campaign.end_date,
                            campaign.network_settings.target_content_network
                        FROM campaign
                        ORDER BY campaign.id",
                CustomerId = AccountID
            };
            object sync = new Object();
            try
            {
                PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> searchPagedResponse = googleAdsService.Search(request);
                Parallel.ForEach(searchPagedResponse, response =>
                {
                    lock (sync)
                    {
                        Campaign.Add(new CampaignSetting()
                        {
                            CampaignID = response.Campaign.Id.ToString(),
                            Name = response.Campaign.Name,
                            Status = response.Campaign.Status.ToString(),
                            StartDate = response.Campaign.StartDate,
                            EndDate = response.Campaign.EndDate,
                        });
                    }

                });
            }
            catch(Exception ee)
            {

            }
            return Campaign.OrderByDescending(c => c.StartDate).ToList();

Google Ads API Forum Advisor

unread,
Sep 13, 2022, 7:04:41 AM9/13/22
to sadi...@gmail.com, adwor...@googlegroups.com
Hi Sadik,

I am Carmela from the Google Ads API team. Thank you for reaching out to us.

Moving forward, it appears that you have encountered the internal_error: DEADLINE_EXCEEDED. The error DEADLINE_EXCEEDED indicates that your request took longer than the deadline. That said, you may check this example to set custom client timeouts.

If you are still consistently encountering said error, then you may provide us with the complete request and response logs with the request-id, so our team can better check. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

For the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex Java) > Logging documentation, which you can access from this link

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2eNjCr:ref
Reply all
Reply to author
Forward
0 new messages