The max_attr_len is the max length for the attribute packet. It should not cause the error.
Could you share your project or some logs?
Max attribute length / Max MTU size decides on how much data can be send on single transmission . In your case it's not about the data size, its about how frequently you are sending the data . I think that was expected behavior. Too many Notification data cannot be sent quickly enough.
You need to monitor congestion event(congested or cleared). If congested, you need to stop sending and wait congestion clear.
In application layer,
Can you try a work around. Application should do two things
1. monitor GATT_CONGEST_EVT. ( Refer wiced_bt_gatt.h file)
This event will have this struct data.
uint16_t conn_id; /**< ID of the connection */
wiced_bool_t congested; /**< congestion state */
If you receive "congested = true", please do not send BLE data.
Once congestion is removed, GATT_CONGEST_EVT event with "congested = FALSE" will be generated and forwarded to application.
2. Check return value of wiced_bt_gatt_send_notification()
As you already done, please check return value of wiced_bt_gatt_send_notification function.
If you got congested error, please wait uncongestion event.
Can you try this method and see ?