Question: ```css
.powder-box {
  width: 51px;
  height: 51px;
  border-radius: 50%;
  border: 2px solid #A5B2B5;
  box-shadow: 0 1px 2px 0px #A5B2B5;
  overflow: hidden;
  position: relative;
}

.powder-inner {
  width: 45px;
  height: 45px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 10px 0 #656565;
  background-color: #00c690;
  overflow: hidden;
  margin: 1px;
}

.powder-wave {
  background-color: white;
  height: 70px;
}
```

```html
<div class="powder-box">
  <div class="powder-inner">
    <div class="powder-wave" style="margin-top: -54px"></div>
  </div>
</div>
```

.powder-inner overflow hidden ,there have a border in there . it can't cover all .
how can i cover all ? [there is border there ?](https://i.stack.imgur.com/s66oE.jpg)

Answer: 
This error message above can occur from having a malformed query in code, and for many people, that's a reasonable explanation. However, I've confirmed that you can also get this mysterious and very misleading error message if you run dynamodb `query` using a shared `Table` resource with multiple threads or tasks under a lot of load. That's what I think is happening in the OP's case. I've seen this happen both with `boto3` 1.9.82 along with the `pathos` library and with `asyncio` in python 3.6. 

To wit, this is something [many of us have suspected](https://github.com/boto/botocore/issues/1246) for a long time - boto3 isn't completely thread-safe even if it does often work in practice.

In this particular case, I suspect there's some state that gets corrupted during the query-building process such that the query that *actually* gets submitted to the service endpoint is invalid. I've not been able to reproduce this on demand; re-running the same code a second time always seems to work. It would be possible to use the `botocore` logger to capture the actual payloads sent to AWS - that would prove my theory. However it's really expensive on my end to capture such a large volume of logs, so I just stopped using shared `Table` resources and I stopped seeing the error.
@killthrush answer turned out to be the cause of this error for us. Basically, as he points out, it appears boto3 is not thread-safe and we were reading from s3 from multiple concurrent threads.

If you are looking for a quick fix, I found the comment by @pedros007 in the link he supplied to work. Basically when you setup the boto3 s3 client, set the max\_pool\_connecetions to the amount of workers you are running and so far we have stopped getting the ValidationException error.

```
# code from pedros007
num_threads = 16
cfg = botocore.config.Config(max_pool_connections=num_threads)
client = boto3.client("s3", config=cfg)
futures = {}
with ThreadPoolExecutor(max_workers = num_threads) as executor:
    for key in keys:
        f = executor.submit(my_head_object_function, key, client)
        futures[f] = key

```

Others have suggested starting a new session in each thread, which I've tried, and does work but there is a large performance hit. With the above method the performance is the same.