EzDevInfo.com

quota interview questions

Top quota frequently asked interview questions

How much memory of Memcache is available to a Google App Engine account?

Google App Engine has some information about Memcache limits:

However, total allowed size of RAM/memory store for a single application is not specified. It's known that no objects above 1MB is allowed. Do you have information?


Source: (StackOverflow)

Docker - Disk Quotas

I understand that docker containers have a maximum of 10GB of disk space with the Device Mapper storage driver by default.

In my case, I have a worker container and a data volume container. I then link them together using "-volumes-from". I also use the Device Mapper storage driver.

Example, I did a test by creating a script to download a 20GB file onto my data volume container and that worked successfully.

My question, is there a 10GB quota for the data volume container? How did the 20GB file download successfully if it is limited by 10GB?


Source: (StackOverflow)

Advertisements

The maximum string content length quota (8192) has been exceeded while reading XML data

I'm trying to pass a large string (24,000 to 50,000 characters) to a self-hosted TCP WCF service.

I've upped the maxStringContentLength (everywhere) to 22008192.

I read somewhere that I need to change the bindingConfiguration to "LargeBuffer" or "LongFields" but when I do this:

<endpoint address="" binding="netTcpBinding" bindingConfiguration="LongFields"
  contract="ExStreamWCF.IService1">

or this:

<endpoint address="" binding="netTcpBinding" bindingConfiguration="LargeBuffer"
  contract="ExStreamWCF.IService1">

My service won't start. I really need this error to go away. Any ideas?

Thanks,

Jason

PS -- config file from the tcp service on the server:

<system.serviceModel>
<services>
  <service behaviorConfiguration="ExStreamWCF.Service1Behavior"
    name="ExStreamWCF.Service1">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
      contract="ExStreamWCF.IService1">
      <identity>
        <dns value="Devexstream-2.anchorgeneral.local" />
        <!--<dns value="vmwin2k3sta-tn2" />-->
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
      contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://Devexstream-2:8080/Service" />
        <!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ExStreamWCF.Service1Behavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

EDIT: Bindings as requested

    <system.serviceModel>
    <bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IService1" closeTimeout="00:01:00"
 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
 transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
 hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
 maxBufferSize="2565536" maxConnections="10" maxReceivedMessageSize="2565536">
 <readerQuotas maxDepth="22008192" maxStringContentLength="22008192" maxArrayLength="2516384"
  maxBytesPerRead="22008192" maxNameTableCharCount="22008192" />
 <reliableSession ordered="true" inactivityTimeout="00:10:00"
  enabled="false" />
 <security mode="Transport">
  <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
  <message clientCredentialType="Windows" />
 </security>
</binding>

</netTcpBinding>
</bindings>

Client Endpoints:

<client>
<endpoint address="net.tcp://devexstream-2:8080/Service" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IService1" contract="TCPService.IService1"
         name="NetTcpBinding_IService1">
<identity>
 <servicePrincipalName value="TCPService\Devexstream-2" />
 <dns value="Devexstream-2.anchorgeneral.local" />
</identity>
</endpoint>

I've edited the service (as follows), but now the service won't start. The new app.config:

<system.serviceModel>
<bindings>
  <netTcpBinding>
    <binding name="ExStreamWCFBinding" closeTimeout="00:00:05" openTimeout="00:00:05" receiveTimeout="00:00:05" sendTimeout="00:00:05" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparison="StrongWildCard" maxBufferPoolSize="524288" maxBufferSize="524288" maxConnections="10" maxReceivedMessageSize="5242880">
      <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    </binding>
  </netTcpBinding>
</bindings>
<services>
  <service behaviorConfiguration="ExStreamWCF.Service1Behavior"
    name="ExStreamWCF.Service1">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="ExStreamWCFBinding"
      contract="ExStreamWCF.IService1">
      <identity>
        <dns value="Devexstream-2.anchorgeneral.local" />
        <!--<dns value="vmwin2k3sta-tn2" />-->
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
      contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://Devexstream-2:8080/Service" />
        <!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ExStreamWCF.Service1Behavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>


Source: (StackOverflow)

(How) can I increase the quota limit of LocalStorage in Android WebView

I need to increase the default quota limit of the LocalStorage in a Android WebView. Currently I can only use around 2.5MB. When trying to store more data, a quota_exceeded_err (dom exception 22) is raised.

Any ideas or do I have to switch to db/file system ?


Source: (StackOverflow)

How to change App Engine's Over Quota page?

Is there anyway to do this? Can I customize the AppEngine's "Over Quota" page? How?

Thanks BTW.

P.S. I mostly build python webapps, never used GAE Java


Source: (StackOverflow)

Plans and pricing generic app?

I'm in need of adding a plans and pricing schema to my website to charge a user for the use of certain feature. In this case, the User adds Notices to Points.

A User should not be able to add more Notices than his' Plan allows. Stuff like that.

A quick google round gave me nothing to look around (django pricing and plans are terrible search terms) so i was thinking in rolling my own solution but may be you know of something of interest.

I'm not very sold to the way the pricing schema would work or how to handle the pricing, but that's not in the scope of the question.


Source: (StackOverflow)

"The maximum string content length quota (8192) has been exceeded while reading XML data" error while sending XML string to WCF

I am working with a .NET, C# application which intends to send a long XML string to a WCF Service method for further operation. When my application tries to send the XML string to WCF Service in runtime, I am getting a error message :

"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:strProdUserDataXML. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 131, position 57.'. Please see InnerException for more details."

My application side web.config I have written the "binding" & "endpoint" as:

<binding name="EndPointHTTPGenericPortal" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    <security mode="None">
    <message clientCredentialType="UserName" algorithmSuite="Default" />
    </security>
    </binding>

    <endpoint address="http://192.168.140.40/WcfGenericPortal_Service/Service1.svc" binding="basicHttpBinding" bindingConfiguration="EndPointHTTPGenericPortal" contract="IService1" name="EndPointHTTPGenericPortal" behaviorConfiguration="Graph" />

If any body can help me on how to solve this error I will be very much obliged. Thanks to all in advance.


Source: (StackOverflow)

Appengine LogService has an undocumented quota - up to 1000000 reads per day, know a way to workaround?

Appengine LogService has an undocumented quota: You can make up to a 1,000,000 reads from it per day, and then you'll receive the following error:

Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/xxx/3.356325783019142341/xxx.py", line 355, in get
    for request_log in logservice.fetch(start_time=start_time, end_time=end_time, version_ids=["3"]):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/logservice/logservice.py", line 414, in __iter__
    self._advance()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/logservice/logservice.py", line 427, in _advance
    response)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 308, in MakeSyncCall
    rpc.CheckSuccess()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
    raise self.exception
OverQuotaError: The API call logservice.Read() required more quota than is available.

Also, when you reach this quota, you'll start see the following on your dashboard (AFAIK you don't see this line there before): enter image description here

At that point it's not documented at all, and it seems it isn't billable too.

See this too: http://groups.google.com/group/google-appengine/browse_thread/thread/61fac55e1a2d521

Hope it'll save you some time.

Let me know if you can think on a workaround... (just to make it a question ;) )


Source: (StackOverflow)

Set MongoDB Database quota (SIZE)

I want to allow my shared hosting sites to use MongoDB, however as they are all on the same VPS server I am able to get mongo to create databases, and asign them to users but I seem not to be able to limit the size of the database only the size of the collection. Which can be changed.

Is there away as an admin to limit the size of the database.


Source: (StackOverflow)

Increase the size of the WebSQL quota in a WebView

In a normal Android web app the maximum size for a WebSQL database is normally around 8MB. In a hybrid web app I am making I would like to increase this limit. How would I go about doing that?

It seems that WebStorage might have something to do with it, but the only method I can see there that seems to set the size, setQuotaForOrigin, is marked deprecated.

Sample code (that is not deprecated) is welcome :)


Source: (StackOverflow)

Programatically access Google App Engine Quota Details

Does anyone know if it is possible to access via code either from within App Engine SDK or some form of WebAPI your current account quota details.

I would like to be able to track the datastore usage and bandwidth usage within the running application so that it may alter its behaviour depending on the levels of Quota left for the application.

Thanks.


Source: (StackOverflow)

Remove all files created by specifed user

I have quotas-enabled drive and I want to remove all files created by specifed user (actually a set of applications that runs using special account) from that drive. How can I do this without recursivly checking all files and folders on HDD is it created by specifed user or not? I just need to get "iterator".


Source: (StackOverflow)

Google App Engine Memcache API Quotas

Google App Engine's documentation states that memcache calls will count towards a quota. Yet, when I click through, memcache quotas or cost is not listed. How can I find the new pricing changes?


Source: (StackOverflow)

Google App Engine - Too many Datastore Read Operations

I have implemented an online leaderboard via Google App Engine for my Android app. But after 2 hours I reached 100% of my quotas in "Datastore Read Operations". Can anybody help me to modify my code to reduce the read operations?
Here is my code:

public class The_Big_Bang_Theory_Quiz_HighscoreserverServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    String game = req.getParameter("game");
    String name = req.getParameter("name");
    String pointsStr = req.getParameter("points");
    String behaviorStr = req.getParameter("behavior");
    int behavior = 0; // 0 = upload, 1 = download
    if (behaviorStr != null) {
        try {
            behavior = Integer.parseInt(behaviorStr);
        } catch (NumberFormatException e) {
            behavior = 0;
        }
    }
    if (behavior == 0) {
        int points = 0;
        if (pointsStr != null) {
            try {
                points = Integer.parseInt(pointsStr);
            } catch (NumberFormatException e) {
                points = 0;
            }
        }
        if (points > 0 && name != null) {
            addHighscore(game, name, points);
        }
    } else {
        String maxStr = req.getParameter("max");
        int max = 1000;
        if (maxStr != null) {
            try {
                max = Integer.parseInt(maxStr);
            } catch (NumberFormatException e) {
                max = 1000;
            }
        }
        returnHighscores(resp, game, max);
    }
}

private void returnHighscores(HttpServletResponse resp, String game, int max) {
    DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
    Key gameKey = KeyFactory.createKey("game", game);
    Query query = new Query("highscore", gameKey);
    query.addSort("points", Query.SortDirection.DESCENDING);
    List<Entity> highscores = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(max));
    for(Entity e : highscores) {
        try {
            resp.getWriter().println(e.getProperty("name") + ";" +e.getProperty("points"));
        } catch (IOException exc) {
            exc.printStackTrace();
        }
    }
}

private void addHighscore(String game, String name, int points) {
    DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
    Key gameKey = KeyFactory.createKey("game", game);
    Entity highscore = new Entity("highscore", gameKey);
    highscore.setProperty("name", name);
    highscore.setProperty("points", points);
    datastore.put(highscore);
}
}

I read something about the BlobStore. Is it a better method?


Source: (StackOverflow)

How to implement user storage quotas using Amazon S3 as storage like dropbox does

Really need some clever minds to help me with this. I'm stuck! I'm implementing a system where users will be allowed to upload videos and files to my site. I'm currently providing them ftp access to their own ftp user account where they upload the files needed. FTP on linux server supports user quotas.

However, now I need to move my upload protocol away from the ftp protocol and looking into amazon s3 file uploading system via http. ftp just gives too much problems with firewalls, ports, active, passive.. list goes on. :) While http s3 uploading will be just a matter of user allowing internet access to the desktop application that will be doing the uploading.

Ive got everything to work fine to the point where each users needs to get 5gb of storage. How do I implement storage quotas on a system like Amazon s3 that does not support it. I cant give unlimited access to my users and I dont want to put my server in the middle either because it just means my server will have to receive the file then upload on the backend to s3 which can be done via mounting s3 as a drive, but then again were back to uploading via ftp to my servers to the mounted s3 drive.

I want application to upload to s3 server directly but maintain user quotas by uploading to the psuedo amazon folder in 1 bucket. Each user will get a subfolder in a bucket that they upload to.

What would be the implementation / logic to make this work?

Do I put another server to monitor the user by looking up files in a /keyname/ to see how much storage is used by that keyname which would be the useraccount? Wouldnt this cost a lot of money in terms of keeping the status of each account usage up to date?

Help please, I need a strategy. Something similar to dropbox implementation of the storing on s3 yet having quota limits for user uploads.


Source: (StackOverflow)