Hello Patrice,

Thank you for your response! I am using the Apache library which does the
setting of socket options I think. Here is what my code looks like.

@Path("/")
public class SparkResource implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -5278229852877855876L;
    private final CloseableHttpClient httpClient =
HttpClients.createDefault();
    private final Logger log = Logger.getLogger(RailwayResource.class
.getName());

    @GET
    @Path("spark")
    @Produces({MediaType.APPLICATION_JSON})
    public String readSparkStatus(@QueryParam("param1") String param1
throws Exception
{

        HttpPost httpPost = new HttpPost("http://www.spark.com";);

        List <NameValuePair> nvps = new ArrayList <NameValuePair>();

        nvps.add(new BasicNameValuePair("param1", param1));

        httpPost.setEntity(new UrlEncodedFormEntity(nvps));

        Document doc = null;
        CloseableHttpResponse response = null;
        try {
            response = httpclient.execute(httpPost);
            HttpEntity entity = response.getEntity();
            doc = Jsoup.parse(entity.getContent(), "UTF-8", "");
            EntityUtils.consume(entity);
        } catch(Exception ex) {
            log.log(Level.SEVERE, ex.getMessage(), ex);
        } finally {
            if(response != null) {
                response.close();
            }
            if(httpClient != null) {
                httpClient.close();
            }
        }

        ...
    }
}


Thank you,
Sagar

On Tue, Nov 10, 2015 at 1:47 PM, Patrice (Cloud Platform Support) <
[email protected]> wrote:

> Hi again Sagar,
>
> Sorry for the delay.
>
> I think that the quota that is mentioned by the error (SET_SOCKET_OPTIONS)
> might be different from the quota you're looking at, which is the "sockets
> created".
>
> Is it possible that you reuse the same sockets a lot and you set your
> options one at a time? Could you show some code about how you use and
> create your sockets?
>
> Cheers!
>
>
> On Friday, November 6, 2015 at 8:32:01 PM UTC-5, Sagar Mutha wrote:
>>
>> Forgot to mention the thread sorry -
>> https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/google-appengine/ApiProxy$24OverQuotaException/google-appengine/w_GG2Y-yHRA/KDKZS3zhEKgJ
>>
>> On Friday, November 6, 2015 at 5:25:19 PM UTC-8, Sagar Mutha wrote:
>>>
>>> Hello Patrice,
>>>
>>> I have started to see this error on my app again today and the sockets
>>> created is just at 36% From past experience this error will stay until the
>>> next quota reset i.e. 12am. Please help me out with this issue. A lot of my
>>> users have started to drop because of this. I have attached the screenshot
>>> of my quota and instance hours used below. This is what the logs say.
>>>
>>> com.google.apphosting.api.ApiProxy$OverQuotaException: The API call 
>>> remote_socket.SetSocketOptions() required more quota than is available.
>>>
>>> I found a thread with a similar issue in this group. Wonder if its a 
>>> related problem?
>>>
>>>
>>> [image: Inline image 3][image: Inline image 4]
>>>
>>>
>>> Hoping for an early resolution.
>>>
>>>
>>> Regards,
>>>
>>> Sagar
>>>
>>>
>>> On Fri, Nov 6, 2015 at 7:45 AM, Sagar Mutha <[email protected]>
>>> wrote:
>>>
>>>> Hello Patrice,
>>>>
>>>> Below is the screenshot of what I see on the quotas page. The app is
>>>> working fine now after the quotas got reset at 12am but that was also the
>>>> case yesterday. By around 6 in the evening it started showing the quota
>>>> exceeded exception. I think the sockets created were about 56% when I
>>>> checked then and frontend instance hours used were well below my daily
>>>> budget.
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-r_po3cXu0LA/VjzKSui1ZNI/AAAAAAAAAA0/qdbt2PvXNH0/s1600/Screen%2BShot%2B2015-11-06%2Bat%2B7.39.26%2BAM.png>
>>>>
>>>>
>>>>
>>>>
>>>> On Friday, November 6, 2015 at 7:33:14 AM UTC-8, Patrice (Cloud
>>>> Platform Support) wrote:
>>>>>
>>>>> Hi Sagar,
>>>>>
>>>>> I believe that what's happening is that the "set socket options" has
>>>>> its own quota. Last time I saw a customer with a similar problem, it 
>>>>> turned
>>>>> out he was calling a third-party library (if memory serves it was an 
>>>>> Apache
>>>>> library) that was doing a lot of socket calls behind the scenes, causing
>>>>> that quota to grow faster than expected.
>>>>>
>>>>> In general, If you're completely certain that your quota is below the
>>>>> limit, I would suggest looking into your daily budget. but I'd be 
>>>>> surprised
>>>>> if that was your issue, as the call calls out the precise method that is
>>>>> triggering the error.
>>>>>
>>>>> Can you show me the quotas you're seeing on your quota page?
>>>>>
>>>>> Cheers!
>>>>>
>>>>> Friday, November 6, 2015 at 2:39:30 AM UTC-5, Sagar Mutha wrote:
>>>>>>
>>>>>> I have seen this error 2 days in a row now. My app is way below the
>>>>>> quota but it keeps showing this exception.
>>>>>> `/api/seat
>>>>>>
>>>>>> com.google.apphosting.api.ApiProxy$OverQuotaException: The API call 
>>>>>> remote_socket.SetSocketOptions() required more quota than is available.`
>>>>>>
>>>>>> This is adversely affecting the user experience of my app. So please 
>>>>>> help me fix asap.
>>>>>>
>>>>>> App Id - saseatavailability
>>>>>>
>>>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "Google App Engine" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/google-appengine/22cj_U1in5w/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/google-appengine.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/google-appengine/f2ae390c-0224-45de-8bdd-b1d4c032dda6%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/google-appengine/f2ae390c-0224-45de-8bdd-b1d4c032dda6%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/22cj_U1in5w/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/20ca7144-e2ae-4595-bed9-2d80881b4e53%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/20ca7144-e2ae-4595-bed9-2d80881b4e53%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CA%2B9_qRYODZ13m3NZcOrhRxmZ8MDyQM6AXw7mRFUfbJjrDH8WWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to